Make test_dynamic_dependent_pipeline_failure more robust
Run the jobs one at a time to make the result more deterministic.
(In doing so, the second job should always be aborted; only if
it ran quickly (before the first job reported and the gate reset)
would it fail.)
Change-Id: I642aef3043bdb5fd641773c544327d80a72bd72e
diff --git a/tests/unit/test_v3.py b/tests/unit/test_v3.py
index 7e8694a..2b27b0e 100755
--- a/tests/unit/test_v3.py
+++ b/tests/unit/test_v3.py
@@ -960,8 +960,7 @@
self.fake_gerrit.addEvent(B.addApproval('Approved', 1))
self.waitUntilSettled()
- self.executor_server.hold_jobs_in_build = False
- self.executor_server.release()
+ self.orderedRelease()
self.waitUntilSettled()
self.assertEqual(A.reported, 2,
"A should report start and failure")
@@ -970,7 +969,7 @@
"B should report start")
self.assertHistory([
dict(name='project-test1', result='FAILURE', changes='1,1'),
- dict(name='project-test1', result='FAILURE', changes='1,1 2,1'),
+ dict(name='project-test1', result='ABORTED', changes='1,1 2,1'),
], ordered=False)
def test_dynamic_dependent_pipeline_absent(self):