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-50946][CORE][TESTS] Add version check for Java 17.0.14 to make UtilsSuite test pass #49599

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions core/src/test/scala/org/apache/spark/util/UtilsSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -526,10 +526,15 @@ class UtilsSuite extends SparkFunSuite with ResetSystemProperties {

// The following 3 scenarios are only for the method: createDirectory(File)
// 6. Symbolic link
// JAVA_RUNTIME_VERSION is like "17.0.14+7-LTS"
lazy val javaVersion = Runtime.Version.parse(SystemUtils.JAVA_RUNTIME_VERSION)
val scenario6 = java.nio.file.Files.createSymbolicLink(new File(testDir, "scenario6")
.toPath, scenario1.toPath).toFile
if (Utils.isJavaVersionAtLeast21) {
assert(Utils.createDirectory(scenario6))
} else if (javaVersion.feature() == 17 && javaVersion.update() >= 14) {
// SPARK-50946: Java 17.0.14 includes JDK-8294193, so scenario6 can succeed.
assert(Utils.createDirectory(scenario6))
} else {
assert(!Utils.createDirectory(scenario6))
}
Expand Down
Loading