vrozov commented on code in PR #53022:
URL: https://github.com/apache/spark/pull/53022#discussion_r2578501385


##########
core/src/test/scala/org/apache/spark/executor/ExecutorSuite.scala:
##########
@@ -503,25 +504,33 @@ class ExecutorSuite extends SparkFunSuite
         e: => Throwable,
         depthToCheck: Int,
         isFatal: Boolean): Unit = {
-      import Executor.isFatalError
+
+      class BeEqualToIsFatal(isFatal: Boolean) extends Matcher[Throwable] {

Review Comment:
   > So the usage of this is to see if an error is a fatal error or not 
(depending on the boolean flag passed in) right?
   
   Almost right, the usage is to check if the **unwrapped** error is a fatal 
error or not, depending on the depth and the boolean flag.
   
   > shouldBeFatalError(true or false)
   
   1. "should" must not be part of the class name. It is already part of the 
matcher check
   2. I am OK with "beFatalError", though "e should beFatalError(false)" means 
"e should *not* be fatal error".
   
   The difference between 2 is 
   1. The initial naming corresponds to "is equal to `isFatal` flag"
   2. The new naming corresponds to "is fatal error (true or false)".
   IMO, the first option is preferable, though I am OK with both options.
   
   @holdenk WDYT?



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