dongjoon-hyun commented on a change in pull request #30389:
URL: https://github.com/apache/spark/pull/30389#discussion_r527914025
##########
File path: core/src/test/scala/org/apache/spark/api/python/PythonRDDSuite.scala
##########
@@ -76,12 +79,22 @@ class PythonRDDSuite extends SparkFunSuite with
LocalSparkContext {
}
test("python server error handling") {
- val authHelper = new SocketAuthHelper(new SparkConf())
- val errorServer = new ExceptionPythonServer(authHelper)
- val client = new Socket(InetAddress.getLoopbackAddress(), errorServer.port)
- authHelper.authToServer(client)
- val ex = intercept[Exception] { errorServer.getResult(Duration(1,
"second")) }
- assert(ex.getCause().getMessage().contains("exception within
handleConnection"))
+ val savedSparkEnv = SparkEnv.get
+ try {
+ val conf = new SparkConf()
+ val env = mock(classOf[SparkEnv])
+ doReturn(conf).when(env).conf
+ SparkEnv.set(env)
Review comment:
Does this exist in `branch-3.0/2.4`?
> The test blowed-up with NPE because SparkEnv.get introduced in the server
side code.
----------------------------------------------------------------
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]