Embedded Q2 no longer System.exits on a startup exception - #766
Merged
Merged
Conversation
Q2.run's catch-all called System.exit(1) unconditionally, so a transient startup exception in an embedded Q2 (tests, jPOS-EE, the Control Plane) killed the host JVM. Gate it on the exit flag, which only Q2.main sets, matching the clean-shutdown path. Closes #765
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #765.
What
Q2.run()catches anyExceptionescaping the boot sequence, logs it, and calledSystem.exit(1)unconditionally. The clean-shutdown path a few lines above only exits when theexitflag is set, and that flag is set only byQ2.main. The failure path now honours the same flag.run(); the host JVM survives.Why
On #764 CI failed with
Process 'Gradle Test Executor 4' finished with non-zero exit value 1: a Q2-booting test hit a transient startup exception, the executor JVM died, and Gradle could not report which test tripped. The rerun passed. With this change the same event shows up as a named failing test with the exception in its output.Tests
No test added; the change is a guard on an existing flag. Full
:jpos:testand:jpos:javadocpass.