uros-b commented on code in PR #56698:
URL: https://github.com/apache/spark/pull/56698#discussion_r3461394526


##########
sql/pipelines/src/test/scala/org/apache/spark/sql/pipelines/graph/TriggeredGraphExecutionSuite.scala:
##########
@@ -1060,4 +1060,53 @@ class TriggeredGraphExecutionSuite extends ExecutionTest 
with SharedSparkSession
 
     assert(warnCount == 2 && errorCount == 1)
   }
+
+  /** A non-retryable (retries exhausted) failure, i.e. one that stops the 
run. */
+  private def stopFailure(ts: Long, flowName: String, cause: Throwable): 
TriggeredFailureInfo = {
+    // currentNumTries > maxAllowedRetries yields a StopFlowExecution.
+    val action = GraphExecution.determineFlowExecutionActionFromError(
+      ex = cause,
+      flowDisplayName = flowName,
+      currentNumTries = 2,
+      maxAllowedRetries = 1)
+    TriggeredFailureInfo(ts, numFailures = 2, lastException = cause, 
lastExceptionAction = action)
+  }
+
+  test("getRunTerminationReason surfaces the earliest non-retryable failure 
deterministically") {

Review Comment:
   Nit: the 3 new tests are named "getRunTerminationReason ..." but invoke the 
helper chooseRunTerminationReason directly. Cosmetic naming mismatch; rename 
for clarity.



-- 
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