Skip to content
Snippets Groups Projects
Commit fb87f449 authored by Jacek Lewandowski's avatar Jacek Lewandowski Committed by Andrew Or
Browse files

SPARK-5548: Fix for AkkaUtilsSuite failure - attempt 2

Author: Jacek Lewandowski <lewandowski.jacek@gmail.com>

Closes #4653 from jacek-lewandowski/SPARK-5548-2-master and squashes the following commits:

0e199b6 [Jacek Lewandowski] SPARK-5548: applied reviewer's comments
843eafb [Jacek Lewandowski] SPARK-5548: Fix for AkkaUtilsSuite failure - attempt 2
parent e945aa61
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@ package org.apache.spark.util
import java.util.concurrent.TimeoutException
import scala.concurrent.Await
import scala.util.{Failure, Try}
import akka.actor._
......@@ -370,8 +371,12 @@ class AkkaUtilsSuite extends FunSuite with LocalSparkContext with ResetSystemPro
val selection = slaveSystem.actorSelection(
AkkaUtils.address(AkkaUtils.protocol(slaveSystem), "spark", "localhost", boundPort, "MapOutputTracker"))
val timeout = AkkaUtils.lookupTimeout(conf)
intercept[TimeoutException] {
slaveTracker.trackerActor = Await.result(selection.resolveOne(timeout * 2), timeout)
val result = Try(Await.result(selection.resolveOne(timeout * 2), timeout))
result match {
case Failure(ex: ActorNotFound) =>
case Failure(ex: TimeoutException) =>
case r => fail(s"$r is neither Failure(ActorNotFound) nor Failure(TimeoutException)")
}
actorSystem.shutdown()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment