Update to gear 0.5.7
There is no API or behavioral change required, but gear 0.5.7 has
significant performance improvements, enough so that it is required
for OpenStack's installation, so bump the requirement here.
Gear 0.5.6 has a regression that causes Zuul tests (but not actual
operation) to fail.
Also includes an unrelated test race fix: the order in which jobs
completed in the test_crd_check_git_depends test was random. Switch
to releasing them in sequence for easier comparison with the build
history at the end.
Change-Id: I281356a620c017a546ec04a0a767cf34c1fc62bf
diff --git a/tests/base.py b/tests/base.py
index becc854..8c96d18 100755
--- a/tests/base.py
+++ b/tests/base.py
@@ -1116,6 +1116,12 @@
while len(self.gearman_server.functions) < count:
time.sleep(0)
+ def orderedRelease(self):
+ # Run one build at a time to ensure non-race order:
+ while len(self.builds):
+ self.release(self.builds[0])
+ self.waitUntilSettled()
+
def release(self, job):
if isinstance(job, FakeBuild):
job.release()
diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py
index 0779bfa..21fb04c 100755
--- a/tests/test_scheduler.py
+++ b/tests/test_scheduler.py
@@ -2089,9 +2089,7 @@
self.waitUntilSettled()
# Run one build at a time to ensure non-race order:
- for x in range(6):
- self.release(self.builds[0])
- self.waitUntilSettled()
+ self.orderedRelease()
self.worker.hold_jobs_in_build = False
self.waitUntilSettled()
@@ -3387,7 +3385,7 @@
def test_crd_check_git_depends(self):
"Test single-repo dependencies in independent pipelines"
- self.gearman_server.hold_jobs_in_queue = True
+ self.gearman_server.hold_jobs_in_build = True
A = self.fake_gerrit.addFakeChange('org/project1', 'master', 'A')
B = self.fake_gerrit.addFakeChange('org/project1', 'master', 'B')
@@ -3399,8 +3397,8 @@
self.fake_gerrit.addEvent(B.getPatchsetCreatedEvent(1))
self.waitUntilSettled()
- self.gearman_server.hold_jobs_in_queue = False
- self.gearman_server.release()
+ self.orderedRelease()
+ self.gearman_server.hold_jobs_in_build = False
self.waitUntilSettled()
self.assertEqual(A.data['status'], 'NEW')