Skip to content

Instantly share code, notes, and snippets.

@ubourdon
Created January 10, 2014 00:54
Show Gist options
  • Save ubourdon/8345054 to your computer and use it in GitHub Desktop.
Save ubourdon/8345054 to your computer and use it in GitHub Desktop.
import concurrent.Await
import akka.pattern.gracefulStop
import akka.actor.ActorSystem
trait ActorTestingTools {
def closeDummyActors(actorsName: String*)(implicit system: ActorSystem) {
import scala.concurrent.duration._
actorsName.map( actorName => gracefulStop(system.actorFor(system / actorName), 1 seconds) )
.map( Await.result(_, 1 seconds) )
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment