Skip to content
Permalink
Browse files

[JENKINS-41276] Fixed some review comments

  • Loading branch information
rsandell committed Jan 27, 2017
1 parent fe87fea commit 3c2bba96d5ac14eb47dbbd326a6739f023e5003e
@@ -67,13 +67,11 @@ public void onFailure(StepContext context, Throwable t) {
try {
Run run = context.get(Run.class);
if (run != null && t instanceof FlowInterruptedException) {
InterruptedBuildAction action = run.getAction(InterruptedBuildAction.class);
if (action != null) {
for (CauseOfInterruption cause : action.getCauses()) {
if (cause instanceof CauseOfInterruption.UserInterruption) {
context.onFailure(t);
return;
}
FlowInterruptedException fie = (FlowInterruptedException) t;
for (CauseOfInterruption cause : fie.getCauses()) {
if (cause instanceof CauseOfInterruption.UserInterruption) {
context.onFailure(t);
return;
}
}
}
@@ -31,7 +31,7 @@
public void abortShouldNotRetry() throws Exception {
WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "p");
p.setDefinition(new CpsFlowDefinition(
"int count = 0; retry(3) { echo 'trying '+(count++); semaphore 'start'; sleep 10; echo 'NotHere' }", false));
"int count = 0; retry(3) { echo 'trying '+(count++); semaphore 'start'; echo 'NotHere' }", true));
WorkflowRun b = p.scheduleBuild2(0).waitForStart();
SemaphoreStep.waitForStart("start/1", b);
b.doStop();

0 comments on commit 3c2bba9

Please sign in to comment.