HeartSaVioR commented on a change in pull request #26292: [SPARK-29635][SS] 
Extract base test suites between Kafka micro-batch sink and Kafka continuous 
sink
URL: https://github.com/apache/spark/pull/26292#discussion_r342879889
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/TestUtils.scala
 ##########
 @@ -215,13 +215,31 @@ private[spark] object TestUtils {
    * exceptions in the tree.
    */
   def assertExceptionMsg(exception: Throwable, msg: String): Unit = {
+    assertExceptionMsgInternal(exception, msg)(_.contains(_))
+  }
+
+  /**
+   * Asserts that "lower-cased" exception message contains the message. Please 
note this checks all
+   * exceptions in the tree.
+   */
+  def assertExceptionLowercaseMsg(exception: Throwable, msg: String): Unit = {
+    assertExceptionMsgInternal(exception, msg) { case (exMsg, m) =>
+      exMsg.toLowerCase(Locale.ROOT).contains(m)
 
 Review comment:
   Looking some of the callers, there're some checks on class name or so which 
is still good to have case-sensitive matching. I'll add the parameter.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to