cdkrot commented on code in PR #41880:
URL: https://github.com/apache/spark/pull/41880#discussion_r1255630770


##########
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/SparkSessionSuite.scala:
##########
@@ -16,12 +16,45 @@
  */
 package org.apache.spark.sql
 
+import java.util.concurrent.TimeUnit
+
+import io.grpc.{CallOptions, Channel, ClientCall, ClientInterceptor, 
MethodDescriptor, Server}
+import io.grpc.netty.NettyServerBuilder
+import org.scalatest.BeforeAndAfterEach
+
+import org.apache.spark.sql.connect.client.DummySparkConnectService
 import org.apache.spark.sql.connect.client.util.ConnectFunSuite
 
 /**
  * Tests for non-dataframe related SparkSession operations.
  */
-class SparkSessionSuite extends ConnectFunSuite {
+class SparkSessionSuite extends ConnectFunSuite with BeforeAndAfterEach {
+  private var service: DummySparkConnectService = _
+  private var server: Server = _
+
+  private def startDummyServer(port: Int): Unit = {
+    service = new DummySparkConnectService
+    server = NettyServerBuilder
+      .forPort(port)
+      .addService(service)
+      .build()
+    server.start()
+  }

Review Comment:
   I guess you refer me to ClientE2ETestSuite? I will take a look. Here I was 
following how it's done in SparkConnectClientSuite. If there is a better way, 
we should replace how the server starts in both places



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