Skip to content

Commit 8fe5f44

Browse files
RayanRalmeta-codesync[bot]
authored andcommitted
Make JUnit 5 the default test framework
Summary: JUnit 4 has been in maintenance mode and the Java Foundation team has been migrating tests to JUnit 5 since January 2026. This diff completes the infrastructure side of the migration by making JUnit 5 the default for java_test targets. Changes: - java_test() macro now defaults to test_type = "junit5" (kotlin_test is unchanged) - Auto-inject JUnit 5 dependencies (jupiter-api, jupiter-engine, platform-launcher) for junit5 targets, mirroring how JUnit 4 deps were previously auto-injected - All 194 existing java_test targets that relied on the implicit JUnit 4 default now have explicit test_type = "junit" to preserve their behavior Going forward: - New java_test targets use JUnit 5 by default - To use JUnit 4, set test_type = "junit" explicitly - The existing JUnit 5 migration codemod (CodemodConfigDevmateJavaJunitMigrator) will continue converting test_type = "junit" targets to "junit5" with source-level import changes Reviewed By: j-bahr Differential Revision: D95378663 fbshipit-source-id: ef5287815f6f7520a4210b8a49ec9b234cdab127
1 parent c2805e8 commit 8fe5f44

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

watchman/java/BUCK

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ java_test(
5454
srcs = glob(["test/**/*.java"]),
5555
source = "7",
5656
target = "7",
57+
test_type = "junit",
5758
deps = [
5859
":watchman-lib",
5960
"//third-party/guava:guava",

0 commit comments

Comments
 (0)