Wildbook icon indicating copy to clipboard operation
Wildbook copied to clipboard

Fix: Correct JUnit 5 test execution

Open HectorCorbellini opened this issue 5 months ago • 0 comments

This pull request resolves a pre-existing issue that prevented JUnit 5 tests from being discovered and executed by Maven. It enables the existing test suite to run correctly, improving the overall stability and testability of the project.

This work was identified while addressing the TapirLink/GBIF removal and has been separated into its own PR for a cleaner, more focused review, as discussed in PR #1205.

Changes Upgraded maven-surefire-plugin to version 3.2.5 in pom.xml for native JUnit 5 support. Corrected the package declaration in OpenSearchTest.java /home/uko/aWILD_ME/WD-analysis/src/test/java/org/ecocean/OpenSearchTest.java to match its directory structure, allowing Maven to discover it. Replaced legacy JUnit 4 assertions with JUnit 5 equivalents in OpenSearchTest.java . Added an entry to CHANGELOG.md to document the fix. Before you Submit!

Is all the text internationalized? Not necessary for this case. These changes are to the build system and have no user-facing text.

If you made a change to the header, did you update the react, jsp, and html? Not necessary for this case. No header changes were made.

Are all depedencies at a locked version? Done. The maven-surefire-plugin is locked to 3.2.5.

Did you adhere to best practices? Done. This PR follows the maintainer's request to isolate build fixes.

Is there a quick unit test you can add? Done. This PR fixes the execution of the entire existing JUnit 5 test suite.

HectorCorbellini avatar Aug 02 '25 03:08 HectorCorbellini