Improve coverage for JUnit @TestTemplate #40773
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.
#40601 exposed a JUnit bug and broke JUnit
@TestTemplate
tests in dev mode. How did that happen? Well, we didn't have any tests, so pretty easily. :)This PR adds some coverage for these kinds of tests, so we should get earlier warning of issues like quarkiverse/quarkiverse#94 in future. At the moment, the test fails, so it's disabled, but we should re-enable it as soon as possible, for example, when #40751 (or its micro-release equivalent) merges.
This is the failure we see when the test is not disabled
The PR's a bit hard to follow from looking at the changes. This is what it's got in it:
@TestTemplate
and the supporting classes are in the same project. This test passes.@TestTemplate
. Sadly, tests don't get re-triggered in dev mode. Because of that, this test doesn't pass, but it's nothing to do with @dmlloyd's serialization work. I've disabled the test and raised JUnit TestTemplate tests are not re-run on code change in dev mode #40770.Note that we still don't have much coverage for some other JUnit advanced use cases, partly because some of the tests are there but failing, and partly because tests are missing.