diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveExternalCatalogVersionsSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveExternalCatalogVersionsSuite.scala index ec10295358d55..f4c314cd6092d 100644 --- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveExternalCatalogVersionsSuite.scala +++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveExternalCatalogVersionsSuite.scala @@ -70,7 +70,8 @@ class HiveExternalCatalogVersionsSuite extends SparkSubmitTestUtils { case _: Exception => None } } - val sites = mirrors.distinct :+ "https://archive.apache.org/dist" + val sites = + mirrors.distinct :+ "https://archive.apache.org/dist" :+ PROCESS_TABLES.releaseMirror logInfo(s"Trying to download Spark $version from $sites") for (site <- sites) { val filename = s"spark-$version-bin-hadoop2.7.tgz" @@ -210,11 +211,12 @@ class HiveExternalCatalogVersionsSuite extends SparkSubmitTestUtils { } object PROCESS_TABLES extends QueryTest with SQLTestUtils { + val releaseMirror = "https://dist.apache.org/repos/dist/release" // Tests the latest version of every release line. val testingVersions: Seq[String] = { import scala.io.Source try { - Source.fromURL("https://dist.apache.org/repos/dist/release/spark/").mkString + Source.fromURL(s"${releaseMirror}/spark").mkString .split("\n") .filter(_.contains("""
  • """.r.findFirstMatchIn(_).get.group(1))