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
This commit is contained in:
James E. Blair 2015-05-05 14:55:26 -07:00
parent 135a9358c1
commit b8c16478d3
3 changed files with 11 additions and 7 deletions

View File

@ -11,7 +11,7 @@ python-daemon>=2.0.4
extras
statsd>=1.0.0,<3.0
voluptuous>=0.7
gear>=0.5.4,<1.0.0
gear>=0.5.7,<1.0.0
apscheduler>=2.1.1,<3.0
PrettyTable>=0.6,<0.8
babel>=1.0

View File

@ -1116,6 +1116,12 @@ class ZuulTestCase(BaseTestCase):
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()

View File

@ -2089,9 +2089,7 @@ class TestScheduler(ZuulTestCase):
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 @@ For CI problems and help debugging, contact ci@example.org"""
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 @@ For CI problems and help debugging, contact ci@example.org"""
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')