Skip to content

Commit

Permalink
Merge pull request #22 from jglick/ProcessLiveness-JENKINS-32264
Browse files Browse the repository at this point in the history
[JENKINS-32264] Verifying that fallback behavior of ProcessLiveness works
  • Loading branch information
jglick committed Jan 11, 2016
2 parents 182d9f9 + 20791b4 commit 5238693
Showing 1 changed file with 17 additions and 0 deletions.
Expand Up @@ -96,6 +96,23 @@ public class WithContainerStepTest {
});
}

@Test public void death() {
story.addStep(new Statement() {
@Override public void evaluate() throws Throwable {
DockerTestUtil.assumeDocker();
WorkflowJob p = story.j.jenkins.createProject(WorkflowJob.class, "p");
p.setDefinition(new CpsFlowDefinition(
"node {\n" +
" withDockerContainer('httpd:2.4.12') {\n" +
" sh 'sleep 5; kill -9 `cat .*/pid`'\n" +
" }\n" +
"}", true));
WorkflowRun b = story.j.assertBuildStatus(Result.FAILURE, p.scheduleBuild2(0).get());
story.j.assertLogContains("script returned exit code -1", b);
}
});
}

@Test public void restart() {
story.addStep(new Statement() {
@Override public void evaluate() throws Throwable {
Expand Down

0 comments on commit 5238693

Please sign in to comment.