Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-37070][TEST] Pass all UTs in mllib-local and mllib with Java 17 #34355

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions pom.xml
Expand Up @@ -285,6 +285,11 @@
<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss z</maven.build.timestamp.format>

<!-- SPARK-36796 for JDK-17 test-->
<!--
SPARK-37070 In order to enable the UTs in `mllib-local` and `mllib` to use `mockito`
to mock `j.u.Random`, "-add-exports=java.base/jdk.internal.util.random=ALL-UNNAMED"
is added. Should remove it when `mockito` can mock `j.u.Random` directly.
-->
<extraJavaTestArgs>
-XX:+IgnoreUnrecognizedVMOptions
--add-opens=java.base/java.lang=ALL-UNNAMED
Expand All @@ -298,6 +303,7 @@
--add-opens=java.base/sun.nio.cs=ALL-UNNAMED
--add-opens=java.base/sun.security.action=ALL-UNNAMED
--add-opens=java.base/sun.util.calendar=ALL-UNNAMED
--add-exports=java.base/jdk.internal.util.random=ALL-UNNAMED
</extraJavaTestArgs>
</properties>
<repositories>
Expand Down
6 changes: 5 additions & 1 deletion project/SparkBuild.scala
Expand Up @@ -1138,7 +1138,11 @@ object TestSettings {
"--add-opens=java.base/sun.nio.ch=ALL-UNNAMED",
"--add-opens=java.base/sun.nio.cs=ALL-UNNAMED",
"--add-opens=java.base/sun.security.action=ALL-UNNAMED",
"--add-opens=java.base/sun.util.calendar=ALL-UNNAMED").mkString(" ")
"--add-opens=java.base/sun.util.calendar=ALL-UNNAMED",
// SPARK-37070 In order to enable the UTs in `mllib-local` and `mllib` to use `mockito`
// to mock `j.u.Random`, "-add-exports=java.base/jdk.internal.util.random=ALL-UNNAMED"
// is added. Should remove it when `mockito` can mock `j.u.Random` directly.
"--add-exports=java.base/jdk.internal.util.random=ALL-UNNAMED").mkString(" ")
s"-Xmx4g -Xss4m -XX:MaxMetaspaceSize=$metaspaceSize -XX:+UseParallelGC -XX:-UseDynamicNumberOfGCThreads -XX:ReservedCodeCacheSize=128m $extraTestJavaArgs"
.split(" ").toSeq
},
Expand Down