testing: Reset INSTRUMENTED_CALLS for subsuites.

We need to reset INSTRUMENTED_CALLS variable before running every
subsuite. If we do not do this then the subsuite running on a
particular process called A will send the accumulated instrumented
calls gathered by the previous subsuites which also ran on the process A.

This also fixes the extra delay that we used to experience after the
tests had finished running. The extra delay was due to the duplicate
instrumented calls in the INSTRUMENTED_CALLS list. The size of this
list used to be ~100k for parallel model as opposed to ~1800 for serial
model.
This commit is contained in:
Umair Khan 2017-04-25 15:03:05 +05:00 committed by Tim Abbott
parent d4ca0f1751
commit 86ebc2ccb1
1 changed files with 2 additions and 0 deletions

View File

@ -236,6 +236,8 @@ def process_instrumented_calls(func):
def run_subsuite(args):
# type: (Tuple[int, Tuple[Type[Iterable[TestCase]], List[str]], bool]) -> Tuple[int, Any]
# Reset the accumulated INSTRUMENTED_CALLS before running this subsuite.
test_helpers.INSTRUMENTED_CALLS = []
subsuite_index, subsuite, failfast = args
runner = RemoteTestRunner(failfast=failfast)
result = runner.run(deserialize_suite(subsuite))