Repository navigation
Run the plugins' JUnit 5 unit tests (surefire discovered none) - #116
Open
opravil-jan wants to merge 1 commit into
Open
opravil-jan wants to merge 1 commit into
opravil-jan wants to merge 1 commit into
Conversation
junit-platform-runner pulled JUnit 4 onto the test classpath, so surefire auto-detected the JUnit4 provider and discovered none of the Jupiter tests: every plugin module reported "Tests run: 0" and the build stayed green. Nothing uses the runner, so drop it together with the now unused junit.platform.version property. Hamcrest was only reachable transitively through JUnit 4; its single user, EntryEditorWidgetSorterTest, now asserts with JUnit's assertEquals like the other test classes. Surefire now runs 360 unit tests across 10 plugins (2 skipped). 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.
Problem
The plugin unit tests have not been running. Every plugin module reports:
All tests under
plugins/*/src/testare JUnit 5 (Jupiter). However,plugins/pom.xmldeclaresjunit-platform-runner, which pulls JUnit 4 onto the test classpath. Surefire therefore auto-selects its JUnit 4 provider and finds none of the Jupiter tests. The build stays green in Jenkins and in the GitHub Actions PR builds.Change
junit-platform-runnerdependency, which nothing uses (there is no@RunWith(JUnitPlatform.class)anywhere), along with thejunit.platform.versionproperty that becomes unused. Surefire then auto-detectsJUnitPlatformProvider.EntryEditorWidgetSorterTest, now usesassertEqualslike the other test classes. The integration tests undertests/are unaffected, since they get Hamcrest as an OSGi bundle from the target platform.Verification
I ran
mvn -f pom-first.xml install && mvn clean installonmaven:3.9.16-eclipse-temurin-17. With this change, surefire runs 360 unit tests in 10 plugins, with 0 failures and 2 skipped (both@DisabledinOpenLdapAclParserTest):The core integration tests (tycho-surefire) give the same result as before: 82 run, 27 skipped because no external LDAP servers were available.
This makes #96 (Dependabot bump of
junit-platform-runner) obsolete.🤖 Generated with Claude Code