Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-41276] Fixed some review comments
  • Loading branch information
rsandell committed Jan 27, 2017
1 parent fe87fea commit 3c2bba9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Expand Up @@ -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;
}
}
}
Expand Down
Expand Up @@ -31,7 +31,7 @@ public class RetryStepTest {
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();
Expand Down

0 comments on commit 3c2bba9

Please sign in to comment.