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


##########
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:
   Well I was going to complain that ClientE2ETestSuite is not a great fit to 
reuse, for some reasons such as it owns how the session is created and it lasts 
for the whole suite, but actually I realized that my test doesn't event need a 
server, so I dropped the server creation altogether



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