Merge "Re-enable test_client_get_running_jobs" into feature/zuulv3

This commit is contained in:
Jenkins 2016-12-07 23:04:53 +00:00 committed by Gerrit Code Review
commit 53417dec74
3 changed files with 9 additions and 8 deletions

View File

@ -3745,7 +3745,6 @@ For CI problems and help debugging, contact ci@example.org"""
self.launch_server.release()
self.waitUntilSettled()
@skip("Disabled for early v3 development")
def test_client_get_running_jobs(self):
"Test that the RPC client can get a list of running jobs"
self.launch_server.hold_jobs_in_build = True
@ -3763,7 +3762,7 @@ For CI problems and help debugging, contact ci@example.org"""
if time.time() - start > 10:
raise Exception("Timeout waiting for gearman server to report "
+ "back to the client")
build = self.launcher.builds.values()[0]
build = self.launch_client.builds.values()[0]
if build.worker.name == "My Worker":
break
else:

View File

@ -362,7 +362,8 @@ class LaunchServer(object):
data = {
'manager': self.hostname,
'url': 'https://server/job',
'url': 'https://server/job/{}/0/'.format(args['job']),
'worker_name': 'My Worker',
}
# TODOv3:

View File

@ -161,10 +161,11 @@ class RPCListener(object):
# args = json.loads(job.arguments)
# TODO: use args to filter by pipeline etc
running_items = []
for pipeline_name, pipeline in six.iteritems(
self.sched.layout.pipelines):
for queue in pipeline.queues:
for item in queue.queue:
running_items.append(item.formatJSON())
for tenant in self.sched.abide.tenants.values():
for pipeline_name, pipeline in six.iteritems(
tenant.layout.pipelines):
for queue in pipeline.queues:
for item in queue.queue:
running_items.append(item.formatJSON())
job.sendWorkComplete(json.dumps(running_items))