Opened 8 years ago

Closed 8 years ago

#26980 closed Cleanup/optimization (fixed)

Make it easier to change what RemoteTestRunner is used

Reported by: Chris Jerdonek Owned by: Chris Jerdonek
Component: Testing framework Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Similar to ticket #26976, this issue is to make it easier to change what RemoteTestRunner class is used by ParallelTestSuite.

Currently, the class name is hard-coded inside _run_subsuite() here:

def _run_subsuite(args):
    subsuite_index, subsuite, failfast = args
    runner = RemoteTestRunner(failfast=failfast)
    result = runner.run(subsuite)
    return subsuite_index, result.events

This could be solved by making _run_subsuite() a method of ParallelTestSuite (instead of a function), and adding a remote_test_runner class attribute to ParallelTestSuite.

Change History (6)

comment:1 by Chris Jerdonek, 8 years ago

Owner: changed from nobody to Chris Jerdonek
Status: newassigned

comment:2 by Chris Jerdonek, 8 years ago

Component: UncategorizedTesting framework
Type: UncategorizedCleanup/optimization

comment:3 by Simon Charette, 8 years ago

Triage Stage: UnreviewedAccepted
Version: 1.9master

comment:4 by Chris Jerdonek, 8 years ago

I posted a pull request for this ticket here.

I tested the change by running the following with both Python 2.7 and 3.5 (verifying also that the tests failed if the change was done incorrectly):

./runtests.py test_utils

comment:5 by Chris Jerdonek, 8 years ago

Has patch: set

comment:6 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: assignedclosed

In ef92ed53:

Fixed #26980 -- Added ParallelTestSuite.runner_class to aid subclassing.

Note: See TracTickets for help on using tickets.
Back to Top