Skip to content

Commit

Permalink
set process to null when stop Jenkins hit timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Pldi23 committed Jul 26, 2022
1 parent 0038ef9 commit 6a1fdad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/jvnet/hudson/test/RealJenkinsRule.java
Expand Up @@ -620,7 +620,8 @@ public void stopJenkins() throws Throwable {
if (!proc.waitFor(60, TimeUnit.SECONDS) ) {
System.err.println("Jenkins failed to stop within 60 seconds, attempting to kill the Jenkins process");
proc.destroyForcibly();
throw new AssertionError("Jenkins failed to terminate within 60 seconds");
proc = null;
return;
}
int exitValue = proc.exitValue();
if (exitValue != 0) {
Expand Down

0 comments on commit 6a1fdad

Please sign in to comment.