test: migrate Maintest to JUnit 5 #4570
Merged
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.
#3919
This is by far the hardest test to migrate. Testing against
System.exit
is more or less dying. For this, we need a Security Manager or a lib providing it for us, like https://todd.ginsberg.com/post/testing-system-exit/. But Security Manager is getting removed real fast in a near version of java https://openjdk.java.net/jeps/411 and the lib can't test for the message. We could only test if the exit code-1
is set. Therefore, I would simply remove this testcase otherwise we have to remove it in JDK 19 or something because spoon can't compile any more(calling methods from a removed API is hard :) ).