Making sure that akka-remote and akka-remote-tests compiles and that tests are green
This commit is contained in:
parent
743f9cd8ff
commit
f3078263bc
6 changed files with 9 additions and 2 deletions
|
|
@ -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) }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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) ⇒
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue