diff --git a/aggregator/src/test/java/org/jenkinsci/plugins/workflow/CpsFlowExecutionTest.java b/aggregator/src/test/java/org/jenkinsci/plugins/workflow/CpsFlowExecutionTest.java
index bfa48b3..57ee251 100644
--- a/aggregator/src/test/java/org/jenkinsci/plugins/workflow/CpsFlowExecutionTest.java
+++ b/aggregator/src/test/java/org/jenkinsci/plugins/workflow/CpsFlowExecutionTest.java
@@ -34,6 +34,7 @@ import java.util.List;
import java.util.ListIterator;
import org.codehaus.groovy.transform.ASTTransformationVisitor;
import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition;
+import org.jenkinsci.plugins.workflow.cps.CpsFlowExecution;
import org.jenkinsci.plugins.workflow.cps.CpsStepContext;
import org.jenkinsci.plugins.workflow.flow.FlowExecution;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
@@ -42,14 +43,17 @@ import org.jenkinsci.plugins.workflow.steps.StepDescriptor;
import org.jenkinsci.plugins.workflow.steps.StepExecution;
import org.jenkinsci.plugins.workflow.test.steps.SemaphoreStep;
import static org.junit.Assert.*;
+import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runners.model.Statement;
+import org.jvnet.hudson.test.BuildWatcher;
import org.jvnet.hudson.test.MemoryAssert;
import org.jvnet.hudson.test.RestartableJenkinsRule;
public class CpsFlowExecutionTest {
+ @ClassRule public static BuildWatcher buildWatcher = new BuildWatcher();
@Rule public RestartableJenkinsRule story = new RestartableJenkinsRule();
private static WeakReference<ClassLoader> LOADER;
@@ -158,6 +162,8 @@ public class CpsFlowExecutionTest {
SemaphoreStep.waitForStart("seven/1", b);
assertStepExecutions(e, "parallel {}", "node {}", "semaphore", "semaphore");
SemaphoreStep.success("six/1", null);
+ ((CpsFlowExecution) e).waitForSuspension();
+ assertStepExecutions(e, "parallel {}", "semaphore");
SemaphoreStep.success("seven/1", null);
SemaphoreStep.waitForStart("eight/1", b);
assertStepExecutions(e, "semaphore");
jglick: We're facing some issues when aborting parallel() steps which started lots of parallel branches, esp. when some of the branches actually didn't start yet. Seems like not all branches get to know that they should abort themselves. Could this issue be related to that?