Skip to content

Commit

Permalink
[SPARK-42451][SQL][TESTS] Simplifies the filter conditions of `testin…
Browse files Browse the repository at this point in the history
…gVersions` in `HiveExternalCatalogVersionsSuite`

### What changes were proposed in this pull request?
Spark 3.1.x already EOL and has been deleted from https://dist.apache.org/repos/dist/release/spark, this pr remove the filter condition `!(v.startsWith("3.1") && SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_17))`  from `testingVersions` check, all version already support test with Java 17.

### Why are the changes needed?
Delete unnecessary test conditions.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass GitHub Actions

Closes apache#40039 from LuciferYang/HiveExternalCatalogVersionsSuite-testVersion.

Authored-by: yangjie01 <[email protected]>
Signed-off-by: Yuming Wang <[email protected]>
  • Loading branch information
LuciferYang authored and wangyum committed Feb 16, 2023
1 parent e3d98a7 commit 5182664
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ object PROCESS_TABLES extends QueryTest with SQLTestUtils {
// Tests the latest version of every release line.
val testingVersions: Seq[String] = if (isPythonVersionAvailable) {
import scala.io.Source
val versions: Seq[String] = try Utils.tryWithResource(
try Utils.tryWithResource(
Source.fromURL(s"$releaseMirror/spark")) { source =>
source.mkString
.split("\n")
Expand All @@ -274,8 +274,6 @@ object PROCESS_TABLES extends QueryTest with SQLTestUtils {
// Do not throw exception during object initialization.
case NonFatal(_) => Nil
}
versions.filter(v => !(v.startsWith("3.1") &&
SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_17)))
} else Seq.empty[String]

protected var spark: SparkSession = _
Expand Down

0 comments on commit 5182664

Please sign in to comment.