Fix test race in test_job_pause_retry (#2)
After calling waitUntilSettled the final job can be paused and appear settled. However we want to wait until all jobs are through so wait for empty builds afterwards. Change-Id: I90ffbbb2120963dec57fd137971726d56430e1d6 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
a598ad76e6
commit
7e29b8a910
|
@ -5096,6 +5096,14 @@ class TestJobPause(AnsibleZuulTestCase):
|
|||
self.executor_server.release()
|
||||
self.waitUntilSettled("global release")
|
||||
|
||||
# The "pause" job might be paused during the waitUntilSettled
|
||||
# call and appear settled; it should automatically resume
|
||||
# though, so just wait for it.
|
||||
for x in iterate_timeout(30, 'paused job'):
|
||||
if not self.builds:
|
||||
break
|
||||
self.waitUntilSettled()
|
||||
|
||||
self.assertHistory([
|
||||
dict(name='test-fail', result='FAILURE', changes='1,1'),
|
||||
dict(name='test-good', result='SUCCESS', changes='1,1'),
|
||||
|
|
Loading…
Reference in New Issue