diff options
author | James E. Blair <jeblair@hp.com> | 2015-02-07 08:01:21 -0800 |
---|---|---|
committer | Joshua Hesketh <josh@nitrotech.org> | 2015-02-10 19:24:38 +1100 |
commit | ae1b2d1d9081723e02f02d35ec16f021fd87ed00 (patch) | |
tree | 390012846a95c07913eec9f0a3098490f24bcac5 | |
parent | 17dd6779f0c1a3b8ad4665f5903f914cc7788f7f (diff) | |
download | zuul-ae1b2d1d9081723e02f02d35ec16f021fd87ed00.tar.gz |
Reorder settled check in tests
Because information moves from merge_client.build_sets to
sched.result_event_queue, perform the merge_client check first
because that is less racy in case of a context switch between
the two checks.
Change-Id: I0c55ee5f04a404f5ab9e3095d2cfabb10a8f64e9
-rwxr-xr-x | tests/base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/base.py b/tests/base.py index afc676bc4..5ae0d3e21 100755 --- a/tests/base.py +++ b/tests/base.py @@ -1217,10 +1217,10 @@ class ZuulTestCase(testtools.TestCase): self.sched.trigger_event_queue.join() self.sched.result_event_queue.join() self.sched.run_handler_lock.acquire() - if (self.sched.trigger_event_queue.empty() and + if (not self.merge_client.build_sets and + self.sched.trigger_event_queue.empty() and self.sched.result_event_queue.empty() and self.fake_gerrit.event_queue.empty() and - not self.merge_client.build_sets and self.haveAllBuildsReported() and self.areAllBuildsWaiting()): self.sched.run_handler_lock.release() |