Skip to content

Commit 2382672

Browse files
author
Andrew Or
committed
Check for exit code
1 parent 3164112 commit 2382672

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,13 @@ class SparkSubmitSuite
499499
Seq("./bin/spark-submit") ++ args,
500500
new File(sparkHome),
501501
Map("SPARK_TESTING" -> "1", "SPARK_HOME" -> sparkHome))
502-
failAfter(60 seconds) { process.waitFor() }
502+
val exitCode = failAfter(60 seconds) { process.waitFor() }
503503
// Ensure we still kill the process in case it timed out
504504
process.destroy()
505+
// If the process did not return cleanly, fail the test
506+
if (exitCode != 0) {
507+
fail(s"Process returned with exit code $exitCode. See the log4j logs for more detail.")
508+
}
505509
}
506510

507511
private def forConfDir(defaults: Map[String, String]) (f: String => Unit) = {

0 commit comments

Comments
 (0)