Re-enable test_queue_precedence test
Update FakeGearmanServer with new gear syntax for job names. Change-Id: If3c4f8e66fa11d3de81b6acbda2be68c94a2fdad Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
a91095fdb3
commit
6ab6af7ad2
|
@ -772,7 +772,7 @@ class FakeGearmanServer(gear.Server):
|
|||
for queue in [self.high_queue, self.normal_queue, self.low_queue]:
|
||||
for job in queue:
|
||||
if not hasattr(job, 'waiting'):
|
||||
if job.name.startswith('build:'):
|
||||
if job.name.startswith('launcher:launch'):
|
||||
job.waiting = self.hold_jobs_in_queue
|
||||
else:
|
||||
job.waiting = False
|
||||
|
@ -799,10 +799,10 @@ class FakeGearmanServer(gear.Server):
|
|||
len(self.low_queue))
|
||||
self.log.debug("releasing queued job %s (%s)" % (regex, qlen))
|
||||
for job in self.getQueue():
|
||||
cmd, name = job.name.split(':')
|
||||
if cmd != 'build':
|
||||
if job.name != 'launcher:launch':
|
||||
continue
|
||||
if not regex or re.match(regex, name):
|
||||
parameters = json.loads(job.arguments)
|
||||
if not regex or re.match(regex, parameters.get('job')):
|
||||
self.log.debug("releasing queued job %s" %
|
||||
job.unique)
|
||||
job.waiting = False
|
||||
|
|
|
@ -2284,7 +2284,6 @@ jobs:
|
|||
Exception, "More than one name assigned to change queue"):
|
||||
self.sched.reconfigure(self.config)
|
||||
|
||||
@skip("Disabled for early v3 development")
|
||||
def test_queue_precedence(self):
|
||||
"Test that queue precedence works"
|
||||
|
||||
|
|
Loading…
Reference in New Issue