You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "amaliujia (via GitHub)" <gi...@apache.org> on 2023/03/09 23:22:47 UTC

[GitHub] [spark] amaliujia commented on a diff in pull request #40354: [SPARK-42735][CONNECT][SCALA] Allow passing extra confs to RemoteSparkSession

amaliujia commented on code in PR #40354:
URL: https://github.com/apache/spark/pull/40354#discussion_r1131742174


##########
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/connect/client/util/RemoteSparkSession.scala:
##########
@@ -114,19 +118,25 @@ object SparkConnectServerUtils {
 }
 
 trait RemoteSparkSession extends ConnectFunSuite with BeforeAndAfterAll {
-  import SparkConnectServerUtils._
   var spark: SparkSession = _
+  var server: SparkConnectServer = _
+
+  protected def sparkConf: SparkConf = new SparkConf(loadDefaults = false)
 
   override def beforeAll(): Unit = {
     super.beforeAll()
-    SparkConnectServerUtils.start()
-    spark = SparkSession.builder().client(SparkConnectClient.builder().port(port).build()).build()
+    server = new SparkConnectServer(sparkConf)

Review Comment:
   +1 to not impact existing test cases that do not need the SparkConf.



-- 
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-unsubscribe@spark.apache.org

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