You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by srowen <gi...@git.apache.org> on 2018/10/07 17:45:40 UTC

[GitHub] spark pull request #22623: [SPARK-25636][CORE] spark-submit cuts off the fai...

Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22623#discussion_r223221911
  
    --- Diff: core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala ---
    @@ -74,20 +74,26 @@ trait TestPrematureExit {
         @volatile var exitedCleanly = false
         mainObject.exitFn = (_) => exitedCleanly = true
     
    +    var message: String = null
         val thread = new Thread {
           override def run() = try {
             mainObject.main(input)
           } catch {
             // If exceptions occur after the "exit" has happened, fine to ignore them.
             // These represent code paths not reachable during normal execution.
    -        case e: Exception => if (!exitedCleanly) throw e
    +        case e: Exception =>
    +          message = e.getMessage
    +          if (!(exitedCleanly || message.contains(searchString))) {
    --- End diff --
    
    If it didn't exit cleanly, can it be possible that the exception is the correct expected one, and that its message contains the search string? I'm probably missing the reason why this has to be checked here.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org