Skip to content

Upgrade from JUnit 4 to JUnit Jupiter 6.0.3#1146

Merged
aaylward merged 1 commit intomainfrom
junit6
Apr 11, 2026
Merged

Upgrade from JUnit 4 to JUnit Jupiter 6.0.3#1146
aaylward merged 1 commit intomainfrom
junit6

Conversation

@aaylward
Copy link
Copy Markdown
Collaborator

@aaylward aaylward commented Apr 11, 2026

Summary

  • Switch to JUnit Jupiter
  • Update java_test_suite wrapper to default to runner="junit5" and auto-inject Jupiter runtime deps
  • Add "" to known_contributing_modules so our 6.0.3 artifacts override contrib_rules_jvm's bundled 5.11.3

Closes #949

Test plan

  • bazel test //... — all 108 tests pass
  • ./scripts/format-all and ./scripts/format-bazel — no formatting issues

- Replace junit:junit:4.13.2 with JUnit Jupiter/Platform 6.0.3 via BOM
- Migrate all test imports from org.junit to org.junit.jupiter.api
- Convert @Before/@after to @BeforeEach/@AfterEach
- Replace @rule TemporaryFolder with @tempdir
- Replace @test(timeout=) with @timeout annotation
- Default java_test_suite wrapper to runner="junit5" with auto-injected
  runtime deps for the Jupiter engine and platform
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
1d4-web e6ec46f Commit Preview URL

Branch Preview URL
Apr 11 2026, 02:09 AM

1 similar comment
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
1d4-web e6ec46f Commit Preview URL

Branch Preview URL
Apr 11 2026, 02:09 AM

@aaylward aaylward added java testing dependencies Pull requests that update a dependency file labels Apr 11, 2026
@aaylward aaylward enabled auto-merge (squash) April 11, 2026 02:11
@aaylward aaylward merged commit 3f5d995 into main Apr 11, 2026
12 checks passed
@aaylward aaylward deleted the junit6 branch April 11, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file java testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

junit 6

1 participant