xkrogen commented on a change in pull request #31333:
URL: https://github.com/apache/spark/pull/31333#discussion_r568762858
##########
File path: core/src/main/scala/org/apache/spark/TestUtils.scala
##########
@@ -223,24 +224,37 @@ private[spark] object TestUtils {
/**
* Asserts that exception message contains the message. Please note this
checks all
- * exceptions in the tree.
+ * exceptions in the tree. If a type parameter `E` is supplied, this will
additionally confirm
+ * that the exception is a subtype of the exception provided in the type
parameter.
*/
- def assertExceptionMsg(exception: Throwable, msg: String, ignoreCase:
Boolean = false): Unit = {
- def contain(msg1: String, msg2: String): Boolean = {
+ def assertExceptionMsg[E <: Throwable : ClassTag](
+ exception: Throwable,
Review comment:
Argh. Try as I might, I can't convince my IDE to use 4 spaces here.
Thanks for the catch.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]