vanzin 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_r342834977
##########
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:
A boolean argument saying whether you want case-insensitive matching would
be cleaner.
Or maybe you don't even need the argument, and just make the existing method
case-insensitive... (just call `toLowerCase` on the expected message too)
----------------------------------------------------------------
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]