pjfanning opened a new pull request, #68: URL: https://github.com/apache/pekko-quickstart-java.g8/pull/68
Switches the template's tests from JUnit 4 to JUnit Jupiter, and fixes CI so it actually runs the templated app's tests. ## JUnit Jupiter - `PekkoQuickstartTest` uses Pekko's `TestKitJUnit5Extension` with an `@JUnit5TestKit ActorTestKit` field, replacing the `TestKitJunitResource` rule. `@TestInstance(PER_CLASS)` is added because the extension only shuts down the last testkit; with the default per-method lifecycle, every additional test would leak an ActorSystem. - **sbt:** `junit-jupiter`, `jupiter-interface` and the `sbt-jupiter-interface` plugin (new `project/plugins.sbt`). The plugin is required for test discovery: with only the library, the test compiles but sbt reports 0 tests. - **Maven:** `junit-jupiter`, surefire pinned to 3.5.5. - **Gradle:** JUnit BOM, `junit-jupiter`, `junit-platform-launcher`, `useJUnitPlatform()`. ### Java 17 is now required The template's `sbt_version` resolves to sbt 2 (currently 2.0.9), and every sbt 2 release of `sbt-jupiter-interface` (0.17.0+) depends on JUnit 6, which needs Java 17. To keep all three builds on the same JUnit version, they all use **JUnit 6.0.3** (aligned with `jupiter-interface` 0.19.0). The Maven compiler moves from `1.8` source/target to `<release>17</release>`, and the README prerequisite changes from JDK 8 to JDK 17. ## CI fix The previous `sbt test` step never ran the templated app's tests. It logged `Test group pekko-java-seed skipped.` and passed, because scripted only runs a test project whose sbt binary version matches the outer build's (sbt 1.13 here vs sbt 2.0.9 in the template). The outer build can't move to sbt 2 yet, since `sbt-paradox` and `pekko-sbt-paradox` have no sbt 2 builds. CI now: 1. `sbt g8 docs/paradox`: renders the template to `target/g8` and builds the docs 2. `sbt testFull` in `target/g8`: `testFull` because sbt 2's `test` is `testQuick` and can skip cached passes 3. `mvn -B test` in `target/g8` Gradle is not added to CI: the template's `build.gradle` uses `mainClassName`, which Gradle 9 removed. ## Testing Locally, the rendered template passes 1/1 tests on sbt 2.0.9, sbt 1.12.3, Maven 3.9.9 and Gradle 8.3. I also ran the new CI steps against a deliberately broken test to confirm that both the sbt and Maven steps fail. 🤖 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]
