Skip to content
Permalink
Browse files

Add test case to reproduce JENKINS-34637.

  • Loading branch information...
orrc committed Sep 23, 2016
1 parent 05bf1fb commit 55488ff554d7edfd966b73ee11b35c4ab2d8811b
Showing with 15 additions and 0 deletions.
  1. +15 −0 src/test/java/org/jenkinsci/plugins/workflow/steps/TimeoutStepRunTest.java
@@ -47,6 +47,21 @@ public void evaluate() throws Throwable {
});
}

@Issue("JENKINS-34637")
@Test
public void basicWithBlock() {
story.addStep(new Statement() {
@Override
public void evaluate() throws Throwable {
WorkflowJob p = story.j.jenkins.createProject(WorkflowJob.class, "p");
p.setDefinition(new CpsFlowDefinition(
"node { timeout(time:5, unit:'SECONDS') { withEnv([]) { sleep 7; echo 'NotHere' } } }"));
WorkflowRun b = story.j.assertBuildStatus(Result.ABORTED, p.scheduleBuild2(0).get());
story.j.assertLogNotContains("NotHere", b);
}
});
}

@Test
public void killingParallel() throws Exception {
story.addStep(new Statement() {

0 comments on commit 55488ff

Please sign in to comment.
You can’t perform that action at this time.