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

    https://github.com/apache/spark/pull/20686#discussion_r171790083
  
    --- Diff: mllib/src/test/scala/org/apache/spark/ml/util/MLTest.scala ---
    @@ -108,5 +111,29 @@ trait MLTest extends StreamTest with TempDirectory { 
self: Suite =>
           otherResultCols: _*)(globalCheckFunction)
         testTransformerOnDF(dataframe, transformer, firstResultCol,
           otherResultCols: _*)(globalCheckFunction)
    +    }
    +
    +  def testTransformerByInterceptingException[A : Encoder](
    +    dataframe: DataFrame,
    +    transformer: Transformer,
    +    expectedMessagePart : String,
    +    firstResultCol: String) {
    +
    +    def hasExpectedMessage(exception: Throwable): Boolean =
    --- End diff --
    
    I doubt whether the check here is too strict. It require exactly match 
message so when some class modify the exception message then many testcase will 
fail.
    Or can we just check the exception type ?


---

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

Reply via email to