Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
[JENKINS-31701] Verifying fix in reported context.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Nov 23, 2015
1 parent 13a467c commit f00baa8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Expand Up @@ -38,6 +38,7 @@
import org.junit.Test;
import org.junit.runners.model.Statement;
import org.jvnet.hudson.test.BuildWatcher;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.RestartableJenkinsRule;

public class SleepStepTest {
Expand Down Expand Up @@ -69,4 +70,15 @@ public class SleepStepTest {
});
}

@Issue("JENKINS-31701")
@Test public void sleepInsideNode() {
r.addStep(new Statement() {
@Override public void evaluate() throws Throwable {
WorkflowJob p = r.j.jenkins.createProject(WorkflowJob.class, "p");
p.setDefinition(new CpsFlowDefinition("node {sleep 1}", true));
r.j.assertBuildStatusSuccess(p.scheduleBuild2(0));
}
});
}

}
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -72,7 +72,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>script-security</artifactId>
<version>1.15</version>
<version>1.16-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand Down

0 comments on commit f00baa8

Please sign in to comment.