From 4aa1ad6a8e06833007bdf6394481964b39322b17 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Fri, 5 Oct 2012 12:39:26 -0700 Subject: [PATCH] Make tests more deterministic (hopefully). Waiting until settled was not considering jobs in the jenkins queue. This corrects that, as well as adding a little more debugging info for the problematic job that was tickling this. Change-Id: I1f4c76ff3e4adc830f47156d0740384815d5a51b Reviewed-on: https://review.openstack.org/14106 Reviewed-by: Clark Boylan Approved: James E. Blair Tested-by: Jenkins --- tests/test_scheduler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py index 12f2ea27ff..d59a66abd9 100644 --- a/tests/test_scheduler.py +++ b/tests/test_scheduler.py @@ -493,7 +493,7 @@ class FakeJenkins(object): len(self.all_jobs))) def fakeAllWaiting(self, regex=None): - all_jobs = self.all_jobs[:] + all_jobs = self.all_jobs[:] + self.queue[:] for job in all_jobs: self.log.debug("job %s %s" % (job.parameters['UUID'], job.isWaiting())) @@ -1481,6 +1481,8 @@ class testScheduler(unittest.TestCase): self.fake_jenkins.fakeRelease('.*-merge') self.waitUntilSettled() + for x in jobs: + print x # all jobs running jobs[0].release() jobs[1].release()