-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the case where the Jenkins process stopped unexpectedly #613
Conversation
It was printing a stacktrace with Connection refused (Connection refused) This now prints the exit code.
try { | ||
endpoint("exit").openStream().close(); | ||
} catch (ConnectException e) { | ||
System.err.println("Unable to connect to the Jenkins process to stop it."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess a stack trace is uninteresting here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll get a stacktrace from the assertion error just below if it happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant the stack trace from the ConnectException
. Really only the detail message could possibly be interesting.
@Test public void killedExternally() throws Throwable { | ||
rr.startJenkins(); | ||
try { | ||
rr.proc.destroy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or I suppose it would work to runRemotely
something that asynchronously calls Jenkins.exit
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, though exit code wouldn't be the same.
It was printing a stacktrace with Connection refused (Connection refused)
This now prints the exit code.
Testing done
Submitter checklist