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

    https://github.com/apache/spark/pull/6205#discussion_r32260319
  
    --- Diff: core/src/test/scala/org/apache/spark/rpc/RpcEnvSuite.scala ---
    @@ -539,6 +546,30 @@ abstract class RpcEnvSuite extends SparkFunSuite with 
BeforeAndAfterAll {
         }
       }
     
    +  test("construct RpcTimeout with conf property") {
    +    val conf = new SparkConf
    +
    +    val testProp = "spark.ask.test.timeout"
    +    val testDurationSeconds = 30
    +    val secondaryProp = "spark.ask.secondary.timeout"
    +
    +    conf.set(testProp, testDurationSeconds.toString + "s")
    +    conf.set(secondaryProp, "100s")
    +
    +    // Construct RpcTimeout with a single property
    +    val rt1 = RpcTimeout(conf, testProp)
    +    assert( testDurationSeconds === rt1.duration.toSeconds )
    +
    +    // Construct RpcTimeout with prioritized list of properties
    +    val rt2 = RpcTimeout(conf, Seq("spark.ask.invalid.timeout", testProp, 
secondaryProp), "1s")
    +    assert( testDurationSeconds === rt2.duration.toSeconds )
    +
    +    // Try to construct RpcTimeout with an unconfigured property
    --- End diff --
    
    add a case for using the default value: `RPCTimeout(conf, 
Seq("spark.ask.invalid.timeout"), "1s")`


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