grundprinzip commented on code in PR #41880:
URL: https://github.com/apache/spark/pull/41880#discussion_r1255633829
##########
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:
Check `ClientE2ETestSuite` which uses `RemoteSparkSession` which is probably
what you want most.
--
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]