yabola commented on code in PR #49270:
URL: https://github.com/apache/spark/pull/49270#discussion_r1897931427


##########
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala:
##########
@@ -938,8 +938,12 @@ class AdaptiveQueryExecSuite
           val error = intercept[SparkException] {
             joined.collect()
           }
-          assert((Seq(error) ++ Option(error.getCause) ++ 
error.getSuppressed()).exists(
-            e => e.getMessage() != null && e.getMessage().contains("coalesce 
test error")))
+          val errorMessages = (Seq(error) ++ Option(error.getCause) ++ 
error.getSuppressed())
+            .filter(e => e.getMessage != null).map(e => e.getMessage)
+          assert(errorMessages.exists(
+            e => e.contains("coalesce test error")),
+            s"Error messages should contain `coalesce test error`, " +
+              s"error messages: $errorMessages")

Review Comment:
   It is unrelated, but this seems to be an unstable UT. I want to print clear 
information when an error occurs.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to