Skip to content

Commit 3233a86

Browse files
committed
Uncomment JunitRuntimePlatform test
Make sure compilation toolchain matches runtime target version This test was failing with --java_language_version=21 Because it got compiled with newer jdk than was run.
1 parent 5a912f0 commit 3233a86

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

test/BUILD

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -776,22 +776,24 @@ scala_junit_test(
776776
runtime_deps = [":JunitMixedSeparateTarget"],
777777
)
778778

779-
#scala_library(
780-
# name = "JunitRuntimePlatform",
781-
# srcs = [
782-
# "src/main/scala/scalarules/test/junit/runtime_platform/JunitRuntimePlatformTest.java",
783-
# ],
784-
# deps = ["@io_bazel_rules_scala_junit_junit"],
785-
#)
786-
#
787-
#scala_junit_test(
788-
# name = "JunitRuntimePlatform_test_runner",
789-
# size = "small",
790-
# runtime_jdk = "@bazel_tools//tools/jdk:remote_jdk11",
791-
# suffixes = ["Test"],
792-
# tests_from = [":JunitRuntimePlatform"],
793-
# runtime_deps = [":JunitRuntimePlatform"],
794-
#)
779+
scala_library(
780+
name = "JunitRuntimePlatform",
781+
srcs = [
782+
"src/main/scala/scalarules/test/junit/runtime_platform/JunitRuntimePlatformTest.java",
783+
],
784+
# make sure java compilation toolchain matches runtime toolchain ie --target
785+
java_compile_toolchain = "@bazel_tools//tools/jdk:toolchain_java11",
786+
deps = ["@io_bazel_rules_scala_junit_junit"],
787+
)
788+
789+
scala_junit_test(
790+
name = "JunitRuntimePlatform_test_runner",
791+
size = "small",
792+
runtime_jdk = "@bazel_tools//tools/jdk:remote_jdk11",
793+
suffixes = ["Test"],
794+
tests_from = [":JunitRuntimePlatform"],
795+
runtime_deps = [":JunitRuntimePlatform"],
796+
)
795797

796798
scala_junit_test(
797799
name = "JunitNoTestEnvironmentTest",

0 commit comments

Comments
 (0)