AngersZhuuuu commented on code in PR #53539:
URL: https://github.com/apache/spark/pull/53539#discussion_r2644660782


##########
core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala:
##########
@@ -1631,6 +1631,22 @@ class SparkSubmitSuite
     assertResult(3)(runSparkSubmit(args, expectFailure = true))
   }
 
+  test("SPARK-54774: k8s submit failed should keep same exit code with user 
code") {
+    val unusedJar = TestUtils.createJarWithClasses(Seq.empty)
+    val args = Seq(
+      "--class", K8sExitCodeTestApplication.getClass.getName.stripSuffix("$"),
+      "--name", "testApp",
+      "--master", "k8s://host:port",
+      "--conf", "spark.ui.enabled=false",
+      "--conf", "spark.master.rest.enabled=false",
+      "--conf", 
"spark.kubernetes.authenticate.driver.serviceAccountName=default",
+      unusedJar.toString
+    )
+    // The test application throws SparkUserAppException with exit code 42,
+    // so SparkContext.stop(42) should be called in k8s mode
+    assertResult(42)(runSparkSubmit(args, expectFailure = true))

Review Comment:
   How about current?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to