maropu commented on a change in pull request #28825:
URL: https://github.com/apache/spark/pull/28825#discussion_r439890770



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
##########
@@ -135,8 +134,9 @@ class SQLQueryTestSuite extends QueryTest with 
SharedSparkSession {
     //   1. Maven can't get correct resource directory when resources in other 
jars.
     //   2. We test subclasses in the hive-thriftserver module.
     val sparkHome = {
-      assert(sys.props.contains("spark.test.home") ||
-        sys.env.contains("SPARK_HOME"), "spark.test.home or SPARK_HOME is not 
set.")
+      if (!(sys.props.contains("spark.test.home") ||  
sys.env.contains("SPARK_HOME"))) {
+        fail("spark.test.home or SPARK_HOME is not set.")
+      }
       sys.props.getOrElse("spark.test.home", sys.env("SPARK_HOME"))
     }

Review comment:
       Ah, looks nice.




----------------------------------------------------------------
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]

Reply via email to