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

    https://github.com/apache/spark/pull/6205#discussion_r32275596
  
    --- Diff: core/src/test/scala/org/apache/spark/rpc/RpcEnvSuite.scala ---
    @@ -162,9 +163,15 @@ abstract class RpcEnvSuite extends SparkFunSuite with 
BeforeAndAfterAll {
         val rpcEndpointRef = anotherEnv.setupEndpointRef("local", env.address, 
"ask-timeout")
         try {
           val e = intercept[Exception] {
    -        rpcEndpointRef.askWithRetry[String]("hello", 1 millis)
    +        rpcEndpointRef.askWithRetry[String]("hello", new RpcTimeout(1 
millis, shortProp))
           }
           assert(e.isInstanceOf[TimeoutException] || 
e.getCause.isInstanceOf[TimeoutException])
    +      e match {
    +        case te: TimeoutException =>
    +          assert(te.getMessage().contains(shortProp))
    +        case e: Exception =>
    +          assert(e.getCause().getMessage().contains(shortProp))
    --- End diff --
    
    The call to `askWithRetry` will catch all exceptions and then throw a 
`SparkException` with the `TimeoutException` as the cause.  So its the 
`TimeoutException` case that will never happen, but I left that in there to 
keep it as before.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to