Created
October 19, 2016 21:45
-
-
Save sc6l6d3v/6abe5c561c01a6c2edcb14012a17f65b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this excerpt fails to locate actor using similar code for actorSelection() | |
class ReaderActorsSpec extends AbsBaseSpec with AppRuntime with AppConfig { | |
import scala.concurrent.ExecutionContext.Implicits.global | |
def findRef(path: String): Option[ActorRef] = | |
try { | |
Some(Await.result(rtSystem.actorSelection(s"/user/$path").resolveOne(1.second), 10.second)) | |
} catch { | |
case ex: Throwable => None | |
} | |
val ctx = createContext(config) | |
val coordRef = rtSystem.actorOf(Props(classOf[CoordinationActor], ctx, config), "coordinator") | |
val coordCheck = findRef("coordinator") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment