Fix test race in test_client_dequeue_change_by_ref
This is a try to fix a test race in test_client_dequeue_change_by_ref because of a hard coded sleep. Instead if the sleep wait for the two builds of master and stable to appear. Change-Id: I326b85c006edbe1f6a194d8abd7632b6035e82b2
This commit is contained in:
parent
f72682f477
commit
878fcc9397
|
@ -3965,9 +3965,12 @@ class TestScheduler(ZuulTestCase):
|
||||||
self.executor_server.hold_jobs_in_build = True
|
self.executor_server.hold_jobs_in_build = True
|
||||||
self.commitConfigUpdate('common-config', 'layouts/timer.yaml')
|
self.commitConfigUpdate('common-config', 'layouts/timer.yaml')
|
||||||
self.sched.reconfigure(self.config)
|
self.sched.reconfigure(self.config)
|
||||||
self.waitUntilSettled()
|
|
||||||
|
|
||||||
time.sleep(5)
|
# We expect that one build for each branch (master and stable) appears.
|
||||||
|
for _ in iterate_timeout(30, 'Wait for two builds that are hold'):
|
||||||
|
if len(self.builds) == 2:
|
||||||
|
break
|
||||||
|
self.waitUntilSettled()
|
||||||
|
|
||||||
client.dequeue(
|
client.dequeue(
|
||||||
tenant='tenant-one',
|
tenant='tenant-one',
|
||||||
|
|
Loading…
Reference in New Issue