Skip to content

Commit 22d9b93

Browse files
zsxwingjeanlyn
authored andcommitted
[SPARK-7291] [CORE] Fix a flaky test in AkkaRpcEnvSuite
Read the port from RpcEnv to check the result so that it will success even if port conflicts Author: zsxwing <[email protected]> Closes apache#5822 from zsxwing/SPARK-7291 and squashes the following commits: e521b84 [zsxwing] Fix a flaky test in AkkaRpcEnvSuite
1 parent 909829d commit 22d9b93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/test/scala/org/apache/spark/rpc/akka/AkkaRpcEnvSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class AkkaRpcEnvSuite extends RpcEnvSuite {
4040
RpcEnvConfig(conf, "test", "localhost", 12346, new SecurityManager(conf)))
4141
try {
4242
val newRef = newRpcEnv.setupEndpointRef("local", ref.address, "test_endpoint")
43-
assert("akka.tcp://local@localhost:12345/user/test_endpoint" ===
43+
assert(s"akka.tcp://local@${env.address}/user/test_endpoint" ===
4444
newRef.asInstanceOf[AkkaRpcEndpointRef].actorRef.path.toString)
4545
} finally {
4646
newRpcEnv.shutdown()

0 commit comments

Comments
 (0)