diff --git a/plugin/src/test/java/org/jenkinsci/plugins/workflow/cps/FlowDurabilityTest.java b/plugin/src/test/java/org/jenkinsci/plugins/workflow/cps/FlowDurabilityTest.java index 2d1e883b3..610e840fa 100644 --- a/plugin/src/test/java/org/jenkinsci/plugins/workflow/cps/FlowDurabilityTest.java +++ b/plugin/src/test/java/org/jenkinsci/plugins/workflow/cps/FlowDurabilityTest.java @@ -9,7 +9,6 @@ import hudson.model.Executor; import hudson.model.Item; import hudson.model.Result; -import hudson.util.CopyOnWriteList; import jenkins.model.Jenkins; import org.apache.commons.lang.StringUtils; import org.jenkinsci.plugins.workflow.TestDurabilityHintProvider; @@ -22,7 +21,6 @@ import org.jenkinsci.plugins.workflow.flow.FlowDurabilityHint; import org.jenkinsci.plugins.workflow.flow.FlowExecution; import org.jenkinsci.plugins.workflow.flow.FlowExecutionList; -import org.jenkinsci.plugins.workflow.flow.FlowExecutionOwner; import org.jenkinsci.plugins.workflow.graph.FlowEndNode; import org.jenkinsci.plugins.workflow.graph.FlowNode; import org.jenkinsci.plugins.workflow.graph.FlowStartNode; @@ -206,17 +204,12 @@ private WorkflowRun createAndRunSleeperJob(Jenkins jenkins, String jobName, Flow } private static void verifyExecutionRemoved(WorkflowRun run) throws Exception{ - // Verify we've removed all FlowExcecutionList entries FlowExecutionList list = FlowExecutionList.get(); for (FlowExecution fe : list) { if (fe == run.getExecution()) { Assert.fail("Run still has an execution in the list and should be removed!"); } } - Field f = list.getClass().getDeclaredField("runningTasks"); - f.setAccessible(true); - CopyOnWriteList runningTasks = (CopyOnWriteList)(f.get(list)); - Assert.assertFalse(runningTasks.contains(run.asFlowExecutionOwner())); } static void verifySucceededCleanly(Jenkins j, WorkflowRun run) throws Exception {