use of org.jenkinsci.plugins.workflow.graph.FlowEndNode in project workflow-cps-plugin by jenkinsci.
the class PersistenceProblemsTest method assertCleanInProgress.
static void assertCleanInProgress(WorkflowRun run) throws Exception {
Assert.assertTrue(run.isBuilding());
Assert.assertNull(run.getResult());
FlowExecution fe = run.getExecution();
AtomicBoolean hasExecutionInList = new AtomicBoolean(false);
FlowExecutionList.get().forEach(f -> {
if (fe != null && f == fe) {
hasExecutionInList.set(true);
}
});
if (!hasExecutionInList.get()) {
Assert.fail("Build completed but should still show in FlowExecutionList");
}
CpsFlowExecution cpsExec = (CpsFlowExecution) fe;
Assert.assertFalse(cpsExec.isComplete());
Assert.assertEquals(Boolean.FALSE, cpsExec.done);
Assert.assertFalse(cpsExec.getCurrentHeads().get(0) instanceof FlowEndNode);
Assert.assertTrue(cpsExec.startNodes != null && !cpsExec.startNodes.isEmpty());
}
Aggregations