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 <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
James E. Blair 2012-10-05 12:39:26 -07:00 committed by Jenkins
parent 45865f3e08
commit 4aa1ad6a8e
1 changed files with 3 additions and 1 deletions

View File

@ -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()