Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16736#discussion_r100040138
  
    --- Diff: 
core/src/test/scala/org/apache/spark/internal/config/ConfigEntrySuite.scala ---
    @@ -128,6 +128,25 @@ class ConfigEntrySuite extends SparkFunSuite {
         assert(conf.get(transformationConf) === "bar")
       }
     
    +  test("conf entry: checkValue()") {
    +    def createConf(default: Int): ConfigEntry[Int] =
    +      ConfigBuilder(testKey("checkValue"))
    +        .intConf
    +        .checkValue(value => value >= 0, "value must be non-negative")
    +        .createWithDefault(default)
    +
    +    // this succeeds
    +    val conf = createConf(10)
    +
    +    // this fails because valueConverter() calls checkValue()
    +    val e1 = intercept[IllegalArgumentException] { 
conf.valueConverter("-1") }
    --- End diff --
    
    to be safer, we should not change the existing behavior. So `conf.set` 
should not fail here and we can follow the next test


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to