Fix race condition in test_success_url

The builds may run in any order.

Change-Id: I705be7a32d0534ae06ea4778bf2bc76d630388d8
This commit is contained in:
James E. Blair 2016-12-21 16:15:00 -08:00
parent dce6ceac8e
commit e75768068b
1 changed files with 4 additions and 1 deletions

View File

@ -4643,7 +4643,10 @@ class TestSchedulerSuccessURL(ZuulTestCase):
self.assertEqual(len(self.history), 2)
# Grab build id
uuid = self.history[0].uuid[:7]
for build in self.history:
if build.name == 'docs-draft-test':
uuid = build.uuid[:7]
break
# Two msgs: 'Starting...' + results
self.assertEqual(len(self.smtp_messages), 2)