diff options
-rw-r--r-- | TESTING.rst | 6 | ||||
-rw-r--r-- | tests/test_scheduler.py | 26 |
2 files changed, 18 insertions, 14 deletions
diff --git a/TESTING.rst b/TESTING.rst index f3fa28e7c..293bb8370 100644 --- a/TESTING.rst +++ b/TESTING.rst @@ -61,6 +61,12 @@ to set up the virtualenv):: .tox/py27/bin/python -m testtools.run tests.test_scheduler.TestScheduler.test_jobs_launched +List Failing Tests +------------------ + + .tox/py27/bin/activate + testr failing --list + Need More Info? --------------- diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py index 85eb8adec..e539f5523 100644 --- a/tests/test_scheduler.py +++ b/tests/test_scheduler.py @@ -648,20 +648,18 @@ class FakeGearmanServer(gear.Server): qlen = (len(self.high_queue) + len(self.normal_queue) + len(self.low_queue)) self.log.debug("releasing queued job %s (%s)" % (regex, qlen)) - for queue in [self.high_queue, self.normal_queue, self.low_queue]: - queue = queue[:] - for job in queue: - cmd, name = job.name.split(':') - if cmd != 'build': - continue - if not regex or re.match(regex, name): - self.log.debug("releasing queued job %s" % - job.unique) - job.waiting = False - released = True - else: - self.log.debug("not releasing queued job %s" % - job.unique) + for job in self.getQueue(): + cmd, name = job.name.split(':') + if cmd != 'build': + continue + if not regex or re.match(regex, name): + self.log.debug("releasing queued job %s" % + job.unique) + job.waiting = False + released = True + else: + self.log.debug("not releasing queued job %s" % + job.unique) if released: self.wakeConnections() qlen = (len(self.high_queue) + len(self.normal_queue) + |