Merge "Include placeholder tasks in get_running_builds"
This commit is contained in:
commit
9e66e45f0a
@ -1461,7 +1461,7 @@ class Jenkins(object):
|
|||||||
raise
|
raise
|
||||||
for executor in info['executors']:
|
for executor in info['executors']:
|
||||||
executable = executor['currentExecutable']
|
executable = executor['currentExecutable']
|
||||||
if executable and 'PlaceholderTask' not in executable.get('_class', ''):
|
if executable and 'number' in executable:
|
||||||
executor_number = executor['number']
|
executor_number = executor['number']
|
||||||
build_number = executable['number']
|
build_number = executable['number']
|
||||||
url = executable['url']
|
url = executable['url']
|
||||||
|
@ -432,7 +432,7 @@ class JenkinsListRunningBuildsTest(JenkinsTestBase):
|
|||||||
|
|
||||||
@patch.object(jenkins.Jenkins, 'get_node_info')
|
@patch.object(jenkins.Jenkins, 'get_node_info')
|
||||||
@patch.object(jenkins.Jenkins, 'get_nodes')
|
@patch.object(jenkins.Jenkins, 'get_nodes')
|
||||||
def test_placeholder_task_in_queue(self, nodes_mock, node_info_mock):
|
def test_unnumbered_task_in_queue(self, nodes_mock, node_info_mock):
|
||||||
nodes_to_return = [{
|
nodes_to_return = [{
|
||||||
'name': "foo-slave", 'offline': False
|
'name': "foo-slave", 'offline': False
|
||||||
}]
|
}]
|
||||||
@ -448,13 +448,7 @@ class JenkinsListRunningBuildsTest(JenkinsTestBase):
|
|||||||
"progress": -1
|
"progress": -1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'currentExecutable': {
|
'currentExecutable': {},
|
||||||
'_class': (
|
|
||||||
'org.jenkinsci.plugins.workflow.support.steps.'
|
|
||||||
'ExecutorStepExecution$PlaceholderTask$'
|
|
||||||
'PlaceholderExecutable'
|
|
||||||
)
|
|
||||||
},
|
|
||||||
'currentWorkUnit': {},
|
'currentWorkUnit': {},
|
||||||
'idle': False,
|
'idle': False,
|
||||||
'likelyStuck': False,
|
'likelyStuck': False,
|
||||||
|
Loading…
Reference in New Issue
Block a user