Skip to content

Commit 19b9716

Browse files
committed
[SPARK-51318][TESTS] Remove jar files from Apache Spark repository and disable affected tests
1 parent 18a60cf commit 19b9716

File tree

11 files changed

+49
-32
lines changed

11 files changed

+49
-32
lines changed

sql/connect/client/jvm/src/test/scala/org/apache/spark/sql/application/ReplE2ESuite.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,9 @@ class ReplE2ESuite extends ConnectFunSuite with RemoteSparkSession with BeforeAn
169169
assertContains("Array[java.lang.Long] = Array(0L, 2L, 4L, 6L, 8L)", output)
170170
}
171171

172-
ignore("SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
173-
"tests: Client-side JAR") {
172+
ignore(
173+
"SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
174+
"tests: Client-side JAR") {
174175
// scalastyle:off classforname line.size.limit
175176
val sparkHome = IntegrationTestUtils.sparkHome
176177
val testJar = Paths

sql/connect/client/jvm/src/test/scala/org/apache/spark/sql/connect/UDFClassLoadingE2ESuite.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import org.apache.spark.connect.proto
2828
import org.apache.spark.sql.connect.common.ProtoDataTypes
2929
import org.apache.spark.sql.connect.test.{ConnectFunSuite, RemoteSparkSession}
3030

31-
3231
@Ignore
3332
class UDFClassLoadingE2ESuite extends ConnectFunSuite with RemoteSparkSession {
3433

sql/connect/client/jvm/src/test/scala/org/apache/spark/sql/connect/client/ArtifactSuite.scala

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ class ArtifactSuite extends ConnectFunSuite with BeforeAndAfterEach {
143143

144144
singleChunkArtifactTest("smallClassFile.class")
145145

146-
ignore("SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
147-
"tests") {
146+
ignore(
147+
"SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
148+
"tests") {
148149
singleChunkArtifactTest("smallJar.jar")
149150
}
150151

@@ -180,8 +181,9 @@ class ArtifactSuite extends ConnectFunSuite with BeforeAndAfterEach {
180181
}
181182
}
182183

183-
ignore("SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
184-
"tests: Chunked Artifact - junitLargeJar.jar") {
184+
ignore(
185+
"SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
186+
"tests: Chunked Artifact - junitLargeJar.jar") {
185187
val artifactPath = artifactFilePath.resolve("junitLargeJar.jar")
186188
artifactManager.addArtifact(artifactPath.toString)
187189
// Expected chunks = roundUp( file_size / chunk_size) = 12
@@ -200,8 +202,9 @@ class ArtifactSuite extends ConnectFunSuite with BeforeAndAfterEach {
200202
checkChunksDataAndCrc(artifactPath, dataChunks)
201203
}
202204

203-
ignore("SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
204-
"tests: Batched SingleChunkArtifacts") {
205+
ignore(
206+
"SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
207+
"tests: Batched SingleChunkArtifacts") {
205208
val file1 = artifactFilePath.resolve("smallClassFile.class").toUri
206209
val file2 = artifactFilePath.resolve("smallJar.jar").toUri
207210
artifactManager.addArtifacts(Seq(file1, file2))
@@ -223,8 +226,9 @@ class ArtifactSuite extends ConnectFunSuite with BeforeAndAfterEach {
223226
assertFileDataEquality(artifacts.get(1).getData, Paths.get(file2))
224227
}
225228

226-
ignore("SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
227-
"tests: Mix of SingleChunkArtifact and chunked artifact") {
229+
ignore(
230+
"SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
231+
"tests: Mix of SingleChunkArtifact and chunked artifact") {
228232
val file1 = artifactFilePath.resolve("smallClassFile.class").toUri
229233
val file2 = artifactFilePath.resolve("junitLargeJar.jar").toUri
230234
val file3 = artifactFilePath.resolve("smallClassFileDup.class").toUri

sql/connect/server/src/test/scala/org/apache/spark/sql/connect/service/AddArtifactsHandlerSuite.scala

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,9 @@ class AddArtifactsHandlerSuite extends SharedSparkSession with ResourceHelper {
211211
}
212212
}
213213

214-
ignore("SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
215-
"tests: Multi chunk artifact") {
214+
ignore(
215+
"SPARK-51318: Remove `jar` files from Apache Spark repository and disable " +
216+
"affected tests: Multi chunk artifact") {
216217
val promise = Promise[AddArtifactsResponse]()
217218
val handler = new TestAddArtifactsHandler(new DummyStreamObserver(promise))
218219
try {
@@ -236,8 +237,9 @@ class AddArtifactsHandlerSuite extends SharedSparkSession with ResourceHelper {
236237
}
237238
}
238239

239-
ignore("SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
240-
"tests: Mix of single-chunk and chunked artifacts") {
240+
ignore(
241+
"SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
242+
"tests: Mix of single-chunk and chunked artifacts") {
241243
val promise = Promise[AddArtifactsResponse]()
242244
val handler = new TestAddArtifactsHandler(new DummyStreamObserver(promise))
243245
try {

sql/core/src/test/scala/org/apache/spark/sql/artifact/ArtifactManagerSuite.scala

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -394,19 +394,20 @@ class ArtifactManagerSuite extends SharedSparkSession {
394394
val testBytes = "test".getBytes(StandardCharsets.UTF_8)
395395
Files.write(randomFilePath, testBytes)
396396

397+
val artifacts = 2
398+
397399
// Register multiple kinds of artifacts
398400
artifactManager.addArtifact( // Class
399401
Paths.get("classes/Hello.class"), path.resolve("Hello.class"), None)
400402
artifactManager.addArtifact( // Python
401403
Paths.get("pyfiles/abc.zip"), randomFilePath, None, deleteStagedFile = false)
402-
ignore("SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
403-
"tests") {
404-
artifactManager.addArtifact( // JAR
405-
Paths.get("jars/udf_noA.jar"), path.resolve("udf_noA.jar"), None)
406-
}
404+
// "SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected tests"
405+
// artifactManager.addArtifact( // JAR
406+
// Paths.get("jars/udf_noA.jar"), path.resolve("udf_noA.jar"), None)
407407
artifactManager.addArtifact( // Cached
408408
Paths.get("cache/test"), randomFilePath, None)
409-
assert(FileUtils.listFiles(artifactManager.artifactPath.toFile, null, true).size() === 3)
409+
assert(FileUtils.listFiles(artifactManager.artifactPath.toFile, null, true).size() ===
410+
artifacts)
410411

411412
// Clone the artifact manager
412413
val newSession = spark.cloneSession()
@@ -426,7 +427,7 @@ class ArtifactManagerSuite extends SharedSparkSession {
426427
}
427428

428429
val allFiles = FileUtils.listFiles(newArtifactManager.artifactPath.toFile, null, true)
429-
assert(allFiles.size() === 3)
430+
assert(allFiles.size() === artifacts)
430431
allFiles.forEach { file =>
431432
assert(!file.getCanonicalPath.contains(spark.sessionUUID))
432433
assert(file.getCanonicalPath.contains(newSession.sessionUUID))

sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveSparkSubmitSuite.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ class HiveSparkSubmitSuite
156156
runSparkSubmit(args)
157157
}
158158

159-
test("SPARK-8489: MissingRequirementError during reflection") {
159+
ignore("SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
160+
"tests: SPARK-8489: MissingRequirementError during reflection") {
160161
// This test uses a pre-built jar to test SPARK-8489. In a nutshell, this test creates
161162
// a HiveContext and uses it to create a data frame from an RDD using reflection.
162163
// Before the fix in SPARK-8470, this results in a MissingRequirementError because

sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveUDFDynamicLoadSuite.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ class HiveUDFDynamicLoadSuite extends QueryTest with SQLTestUtils with TestHiveS
149149
val jarPath = "src/test/noclasspath/hive-test-udfs.jar"
150150
val jarUrl = s"file://${System.getProperty("user.dir")}/$jarPath"
151151

152-
test("Spark should be able to run Hive UDF using jar regardless of " +
152+
ignore("SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
153+
"tests: Spark should be able to run Hive UDF using jar regardless of " +
153154
s"current thread context classloader (${udfInfo.identifier}") {
154155
Utils.withContextClassLoader(Utils.getSparkClassLoader) {
155156
withUserDefinedFunction(udfInfo.funcName -> false) {

sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3240,7 +3240,8 @@ class HiveDDLSuite
32403240
}
32413241
}
32423242

3243-
test("SPARK-34261: Avoid side effect if create exists temporary function") {
3243+
ignore("SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
3244+
"tests: SPARK-34261: Avoid side effect if create exists temporary function") {
32443245
withUserDefinedFunction("f1" -> true) {
32453246
sql("CREATE TEMPORARY FUNCTION f1 AS 'org.apache.hadoop.hive.ql.udf.UDFUUID'")
32463247

sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,8 @@ class HiveQuerySuite extends HiveComparisonTest with SQLTestUtils with BeforeAnd
835835
}
836836
}
837837

838-
test("ADD JAR command 2") {
838+
ignore("SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
839+
"tests: ADD JAR command 2") {
839840
// this is a test case from mapjoin_addjar.q
840841
val testJar = HiveTestJars.getHiveHcatalogCoreJar().toURI
841842
val testData = TestHive.getHiveFile("data/files/sample.json").toURI
@@ -868,7 +869,8 @@ class HiveQuerySuite extends HiveComparisonTest with SQLTestUtils with BeforeAnd
868869
}
869870
}
870871

871-
test("CREATE TEMPORARY FUNCTION") {
872+
ignore("SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
873+
"tests: CREATE TEMPORARY FUNCTION") {
872874
val funcJar = TestHive.getHiveFile("TestUDTF.jar")
873875
val jarURL = funcJar.toURI.toURL
874876
sql(s"ADD JAR $jarURL")

sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUDFSuite.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,8 @@ class HiveUDFSuite extends QueryTest with TestHiveSingleton with SQLTestUtils {
605605
}
606606
}
607607

608-
test("UDTF") {
608+
ignore("SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
609+
"tests: UDTF") {
609610
withUserDefinedFunction("udtf_count2" -> true) {
610611
sql(s"ADD JAR ${hiveContext.getHiveFile("TestUDTF.jar").getCanonicalPath}")
611612
// The function source code can be found at:
@@ -626,7 +627,8 @@ class HiveUDFSuite extends QueryTest with TestHiveSingleton with SQLTestUtils {
626627
}
627628
}
628629

629-
test("permanent UDTF") {
630+
ignore("SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
631+
"tests: permanent UDTF") {
630632
withUserDefinedFunction("udtf_count_temp" -> false) {
631633
sql(
632634
s"""

sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ abstract class SQLQuerySuiteBase extends QueryTest with SQLTestUtils with TestHi
258258
"when `expr1` = `expr4`, return `expr5`; else return `expr6`")
259259
}
260260

261-
test("describe functions - user defined functions") {
261+
ignore("SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
262+
"tests: describe functions - user defined functions") {
262263
withUserDefinedFunction("udtf_count" -> false) {
263264
sql(
264265
s"""
@@ -283,7 +284,8 @@ abstract class SQLQuerySuiteBase extends QueryTest with SQLTestUtils with TestHi
283284
}
284285
}
285286

286-
test("describe functions - temporary user defined functions") {
287+
ignore("SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
288+
"tests: describe functions - temporary user defined functions") {
287289
withUserDefinedFunction("udtf_count_temp" -> true) {
288290
sql(
289291
s"""
@@ -2484,7 +2486,8 @@ abstract class SQLQuerySuiteBase extends QueryTest with SQLTestUtils with TestHi
24842486
}
24852487
}
24862488

2487-
test("SPARK-32668: HiveGenericUDTF initialize UDTF should use StructObjectInspector method") {
2489+
ignore("SPARK-51318: Remove `jar` files from Apache Spark repository and disable affected " +
2490+
"tests: SPARK-32668: HiveGenericUDTF initialize UDTF should use StructObjectInspector method") {
24882491
withUserDefinedFunction("udtf_stack1" -> true, "udtf_stack2" -> true) {
24892492
sql(
24902493
s"""

0 commit comments

Comments
 (0)