Fix race in test_crd_check_duplicate more
The previous fix was insufficient because multiple merge jobs
could be run at once. Using the new orderedRelease method however
should be sufficient, and it ensures only one job runs and finishes
at a time.
The previous code was more appropriate for a test of a gate
pipeline and was probably copied from it.
Change-Id: I0534c7ce6dd473cb71ba37c8c0fedef8e5ca72a5
diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py
index 76e91ce..3b59e3e 100755
--- a/tests/test_scheduler.py
+++ b/tests/test_scheduler.py
@@ -3476,12 +3476,7 @@
# Release jobs in order to avoid races with change A jobs
# finishing before change B jobs.
- self.worker.release('.*-merge')
- self.worker.release('project1-.*')
- self.waitUntilSettled()
- self.worker.release('.*-merge')
- self.worker.release('project1-.*')
- self.waitUntilSettled()
+ self.orderedRelease()
self.worker.hold_jobs_in_build = False
self.worker.release()
self.waitUntilSettled()