opravil-jan opened a new pull request, #116:
URL: https://github.com/apache/directory-studio/pull/116

   ## Problem
   
   The plugin unit tests have not been running. Every plugin module reports:
   
   ```
   [INFO] Using auto detected provider 
org.apache.maven.surefire.junit4.JUnit4Provider
   [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
   ```
   
   All tests under `plugins/*/src/test` are JUnit 5 (Jupiter). However, 
`plugins/pom.xml` declares `junit-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
   
   - Remove the `junit-platform-runner` dependency, which nothing uses (there 
is no `@RunWith(JUnitPlatform.class)` anywhere), along with the 
`junit.platform.version` property that becomes unused. Surefire then 
auto-detects `JUnitPlatformProvider`.
   - Hamcrest was reachable only transitively through JUnit 4. Its only user, 
`EntryEditorWidgetSorterTest`, now uses `assertEquals` like the other test 
classes. The integration tests under `tests/` 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 install` on 
`maven:3.9.16-eclipse-temurin-17`. With this change, surefire runs **360 unit 
tests** in 10 plugins, with 0 failures and 2 skipped (both `@Disabled` in 
`OpenLdapAclParserTest`):
   
   | plugin | tests |
   |---|---|
   | openldap.syncrepl | 77 |
   | ldapbrowser.core | 52 |
   | schemaeditor | 52 |
   | templateeditor | 39 |
   | openldap.config.editor | 34 |
   | openldap.acl.editor | 30 (2 skipped) |
   | openldap.common.ui | 26 |
   | ldapbrowser.common | 23 |
   | ldifparser | 14 |
   | valueeditors | 13 |
   
   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](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to