Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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._

Expand Down Expand Up @@ -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)")
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will create a lot of warnings complaining that the match is not exhaustive. I thin you'll need to add a case _ => fail(...) to fix this


actorSystem.shutdown()
Expand Down