You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/06/15 01:16:43 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #28825: [SPARk-31950][SQL][FOLLOW-UP][MINOR] Better error message on SPARK_HOME or…

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



##########
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:
       Yeah, let's do that. There look two more occurrences.
   
   ```
   sql/core/src/test/scala/org/apache/spark/sql/ExpressionsSchemaSuite.scala:      assert(sys.props.contains("spark.test.home") ||
   sql/core/src/test/scala/org/apache/spark/sql/IntegratedUDFTestUtils.scala:    assert(sys.props.contains("spark.test.home") ||
   ```




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org