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