Commit 23a8c972 authored by Jérome Perrin's avatar Jérome Perrin

testTaskDistribution: fix random failures with test_04c_startTestSuiteOrderWithManyTestNodes

test_04c_startTestSuiteOrderWithManyTestNodes is using same test results
names ("test suite 1", "test suite 2", ...) as some previous tests (
test_04b_startTestSuiteOrder ) so it's safer to start the test by
cancelling all previous test runs and renaming them.

/reviewed-on nexedi/erp5!959
parent 1519d81a
...@@ -362,6 +362,7 @@ class TestTaskDistribution(ERP5TypeTestCase): ...@@ -362,6 +362,7 @@ class TestTaskDistribution(ERP5TypeTestCase):
This avoid affecting all test nodes to a test suite having medium priority This avoid affecting all test nodes to a test suite having medium priority
while a test suite with high priority is waiting for more nodes to speed up. while a test suite with high priority is waiting for more nodes to speed up.
""" """
self._cleanupTestResult()
for x in range(10): for x in range(10):
json.loads(self.distributor.startTestSuite(title="COMP%s-Node1" % x)) json.loads(self.distributor.startTestSuite(title="COMP%s-Node1" % x))
test_suite_list = self._createTestSuite(quantity=3) test_suite_list = self._createTestSuite(quantity=3)
...@@ -505,6 +506,7 @@ class TestTaskDistribution(ERP5TypeTestCase): ...@@ -505,6 +506,7 @@ class TestTaskDistribution(ERP5TypeTestCase):
for test_result in test_list: for test_result in test_list:
if test_result.getSimulationState() in cleanup_state_list: if test_result.getSimulationState() in cleanup_state_list:
test_result.cancel() test_result.cancel()
test_result.setTitle('previous test')
self.tic() self.tic()
def _createTestResult(self, revision="r0=a,r1=a", node_title='Node0', def _createTestResult(self, revision="r0=a,r1=a", node_title='Node0',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment