Repository navigation
MYFACES-4785: Upgrade tests to JUnit 6 - #1145
Merged
Merged
Conversation
Migrate tests to JUnit 6 via OpenRewrite and fix the resulting breakage: - restore cross-package visibility and renamed overrides - fix lambdas that assigned captured locals - restore assertEquals delta in ResourceLoaderUtilsTest - keep Quarkus showcase on JUnit 5.13.4 (Quarkus 3.27 does not support JUnit 6) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
https://issues.apache.org/jira/browse/MYFACES-4785
Migrates the test suite to JUnit 6 (6.1.3) using OpenRewrite, bumps Surefire to 3.6.1, and fixes the breakage the automated migration introduced.
Fixes after OpenRewrite
UIDataTestrestored topublic(itsRowDatais used byUIRepeatTestin another package).StateManagerWithFaceletsClientSideTest,Html{Body,SelectManyCheckbox,SelectOneRadio}ClientBehaviorRendererTest).assertDoesNotThrowlambdas that assigned captured locals now return values or use effectively-final copies (ViewHandlerImplTest,HtmlTableRendererTest,ResponseWrapperSwitchTest,AbstractClientBehaviorTestCase); the worker-thread blocks inLRULinkedHashMapTestgo back to try/catch.ResourceLoaderUtilsTest.parseDateHeader: restored the 2000 ms delta the rewrite dropped.UIComponentBaseTest.processDecodesCallsRenderResoponseIfDecodeThrowsException: restored the original structure. Note: this test already passed without testing anything before this change (expectLastCall()throwsIllegalStateException, which satisfiesassertThrows). Worth a follow-up.quarkus-junit5) ships the JUnit 5 platform, and mixing in Jupiter 6 fails test discovery.Testing
mvn installpasses locally: impl 1787 tests, 0 failures. The Quarkus showcase passes too (1 test was already@Disabled).🤖 Generated with Claude Code