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



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/SparkSessionBuilderSuite.scala
##########
@@ -386,4 +386,32 @@ class SparkSessionBuilderSuite extends SparkFunSuite with 
BeforeAndAfterEach {
     assert(spark2.conf.get(custom) === "c2")
 
   }
+
+

Review comment:
       nit: `double blank line` -> `a single blank line`

##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/SparkSessionBuilderSuite.scala
##########
@@ -386,4 +386,32 @@ class SparkSessionBuilderSuite extends SparkFunSuite with 
BeforeAndAfterEach {
     assert(spark2.conf.get(custom) === "c2")
 
   }
+
+
+  test("SPARK-33944: warning setting hive.metastore.warehouse.dir using 
session options") {
+    val msg = "Not allowing to set hive.metastore.warehouse.dir in 
SparkSession's options"
+    val logAppender = new LogAppender(msg)
+    withLogAppender(logAppender) {
+      SparkSession.builder()
+        .master("local")
+        .config("hive.metastore.warehouse.dir", "any")
+        .getOrCreate()
+        .sharedState
+    }
+    
assert(logAppender.loggingEvents.exists(_.getRenderedMessage.contains(msg)))
+  }
+
+

Review comment:
       ditto




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