diff --git a/akka-remote-tests/src/main/scala/akka/remote/testconductor/Conductor.scala b/akka-remote-tests/src/main/scala/akka/remote/testconductor/Conductor.scala index d875f34747..fba915dd46 100644 --- a/akka-remote-tests/src/main/scala/akka/remote/testconductor/Conductor.scala +++ b/akka-remote-tests/src/main/scala/akka/remote/testconductor/Conductor.scala @@ -86,6 +86,7 @@ trait Conductor { this: TestConductorExt ⇒ if (_controller ne null) throw new RuntimeException("TestConductorServer was already started") _controller = system.actorOf(Props(new Controller(participants, controllerPort)), "controller") import Settings.BarrierTimeout + import system.dispatcher controller ? GetSockAddr flatMap { case sockAddr: InetSocketAddress ⇒ startClient(name, sockAddr) map (_ ⇒ sockAddr) } } diff --git a/akka-remote-tests/src/main/scala/akka/remote/testconductor/Player.scala b/akka-remote-tests/src/main/scala/akka/remote/testconductor/Player.scala index 273b3cf1d0..f102d3b700 100644 --- a/akka-remote-tests/src/main/scala/akka/remote/testconductor/Player.scala +++ b/akka-remote-tests/src/main/scala/akka/remote/testconductor/Player.scala @@ -212,10 +212,12 @@ private[akka] class ClientFSM(name: RoleName, controllerAddr: InetSocketAddress) stay using d.copy(runningOp = None) case t: ThrottleMsg ⇒ import settings.QueryTimeout + import context.dispatcher // FIXME is this the right EC for the future below? TestConductor().failureInjector ? t map (_ ⇒ ToServer(Done)) pipeTo self stay case d: DisconnectMsg ⇒ import settings.QueryTimeout + import context.dispatcher // FIXME is this the right EC for the future below? TestConductor().failureInjector ? d map (_ ⇒ ToServer(Done)) pipeTo self stay case TerminateMsg(exit) ⇒ diff --git a/akka-remote/src/main/scala/akka/remote/RemoteActorRefProvider.scala b/akka-remote/src/main/scala/akka/remote/RemoteActorRefProvider.scala index fed5f96341..eb8fb7a204 100644 --- a/akka-remote/src/main/scala/akka/remote/RemoteActorRefProvider.scala +++ b/akka-remote/src/main/scala/akka/remote/RemoteActorRefProvider.scala @@ -91,7 +91,7 @@ private[akka] class RemoteActorRefProvider( system.eventStream.subscribe(remoteClientLifeCycleHandler, classOf[RemoteLifeCycleEvent]) - terminationFuture.onComplete(_ ⇒ transport.shutdown()) + system.registerOnTermination(transport.shutdown()) } def actorOf(system: ActorSystemImpl, props: Props, supervisor: InternalActorRef, path: ActorPath, diff --git a/akka-remote/src/test/scala/akka/remote/NetworkFailureSpec.scala b/akka-remote/src/test/scala/akka/remote/NetworkFailureSpec.scala index 1c09613fe0..053c9a93b6 100644 --- a/akka-remote/src/test/scala/akka/remote/NetworkFailureSpec.scala +++ b/akka-remote/src/test/scala/akka/remote/NetworkFailureSpec.scala @@ -10,15 +10,17 @@ import akka.remote.netty.NettyRemoteTransport import akka.actor.Actor import akka.testkit.AkkaSpec import akka.testkit.DefaultTimeout -import scala.concurrent.Future import java.util.concurrent.{ TimeUnit, CountDownLatch } import java.util.concurrent.atomic.AtomicBoolean +import scala.concurrent.{ ExecutionContext, Future } trait NetworkFailureSpec extends DefaultTimeout { self: AkkaSpec ⇒ import Actor._ import scala.concurrent.util.Duration + import system.dispatcher + val BytesPerSecond = "60KByte/s" val DelayMillis = "350ms" val PortRange = "1024-65535" diff --git a/akka-remote/src/test/scala/akka/remote/RemoteCommunicationSpec.scala b/akka-remote/src/test/scala/akka/remote/RemoteCommunicationSpec.scala index dd0c36873d..1f0badebd2 100644 --- a/akka-remote/src/test/scala/akka/remote/RemoteCommunicationSpec.scala +++ b/akka-remote/src/test/scala/akka/remote/RemoteCommunicationSpec.scala @@ -132,6 +132,7 @@ akka { } "not fail ask across node boundaries" in { + import system.dispatcher val f = for (_ ← 1 to 1000) yield here ? "ping" mapTo manifest[(String, ActorRef)] Await.result(Future.sequence(f), remaining).map(_._1).toSet must be(Set("pong")) } diff --git a/akka-remote/src/test/scala/akka/remote/Ticket1978CommunicationSpec.scala b/akka-remote/src/test/scala/akka/remote/Ticket1978CommunicationSpec.scala index 7bd2663b07..dfa47665de 100644 --- a/akka-remote/src/test/scala/akka/remote/Ticket1978CommunicationSpec.scala +++ b/akka-remote/src/test/scala/akka/remote/Ticket1978CommunicationSpec.scala @@ -141,6 +141,7 @@ abstract class Ticket1978CommunicationSpec(val cipherConfig: CipherConfig) exten } "support ask" in { + import system.dispatcher val here = system.actorFor(otherAddress.toString + "/user/echo") val f = for (i ← 1 to 1000) yield here ? (("ping", i)) mapTo manifest[((String, Int), ActorRef)]