jingz-db commented on code in PR #47819: URL: https://github.com/apache/spark/pull/47819#discussion_r1735270391
########## sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/sources/ForeachWriterSuite.scala: ########## @@ -142,8 +144,13 @@ class ForeachWriterSuite extends StreamTest with SharedSparkSession with BeforeA val e = intercept[StreamingQueryException] { query.processAllAvailable() } - assert(e.getCause.isInstanceOf[SparkException]) - assert(e.getCause.getCause.getMessage === "ForeachSinkSuite error") + + val errClass = "FOREACH_USER_FUNCTION_ERROR" + + // verify that we classified the exception + assert(e.getMessage.contains(errClass)) + assert(e.cause.asInstanceOf[RuntimeException].getMessage == funcEx.getMessage) Review Comment: Ah somehow exact equal will fail... Not sure why though. -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org