Skip to content

Commit

Permalink
Rename protocol from "artery" to "akka" (akka#21405)
Browse files Browse the repository at this point in the history
  • Loading branch information
johanandren authored Sep 8, 2016
1 parent 06681ae commit b127f1f
Show file tree
Hide file tree
Showing 22 changed files with 66 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import org.openjdk.jmh.annotations._
class LiteralEncodingBenchmark {

private val UsAscii = Charset.forName("US-ASCII")
private val str = "artery://SomeSystem@host12:1234/user/foo"
private val str = "akka://SomeSystem@host12:1234/user/foo"
private val buffer = ByteBuffer.allocate(128).order(ByteOrder.LITTLE_ENDIAN)
private val literalChars = Array.ofDim[Char](64)
private val literalBytes = Array.ofDim[Byte](64)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ private[remote] class ArteryTransport(_system: ExtendedActorSystem, _provider: R
*/
private[remote] object ArteryTransport {

val ProtocolName = "artery"
val ProtocolName = "akka"

val Version = 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class HandshakeFailureSpec extends AkkaSpec(HandshakeFailureSpec.commonConfig) w
"Artery handshake" must {

"allow for timeout and later connect" in {
def sel = system.actorSelection(s"artery://systemB@localhost:$portB/user/echo")
def sel = system.actorSelection(s"akka://systemB@localhost:$portB/user/echo")
sel ! "hello"
expectNoMsg(3.seconds) // longer than handshake-timeout

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class HandshakeRetrySpec extends AkkaSpec(HandshakeRetrySpec.commonConfig) with
"Artery handshake" must {

"be retried during handshake-timeout (no message loss)" in {
def sel = system.actorSelection(s"artery://systemB@localhost:$portB/user/echo")
def sel = system.actorSelection(s"akka://systemB@localhost:$portB/user/echo")
sel ! "hello"
expectNoMsg(1.second)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class InboundControlJunctionSpec extends AkkaSpec with ImplicitSender {
val matSettings = ActorMaterializerSettings(system).withFuzzing(true)
implicit val mat = ActorMaterializer(matSettings)(system)

val addressA = UniqueAddress(Address("artery", "sysA", "hostA", 1001), 1)
val addressB = UniqueAddress(Address("artery", "sysB", "hostB", 1002), 2)
val addressA = UniqueAddress(Address("akka", "sysA", "hostA", 1001), 1)
val addressB = UniqueAddress(Address("akka", "sysB", "hostB", 1002), 2)

"Control messages" must {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class InboundHandshakeSpec extends AkkaSpec with ImplicitSender {
val matSettings = ActorMaterializerSettings(system).withFuzzing(true)
implicit val mat = ActorMaterializer(matSettings)(system)

val addressA = UniqueAddress(Address("artery", "sysA", "hostA", 1001), 1)
val addressB = UniqueAddress(Address("artery", "sysB", "hostB", 1002), 2)
val addressA = UniqueAddress(Address("akka", "sysA", "hostA", 1001), 1)
val addressB = UniqueAddress(Address("akka", "sysB", "hostB", 1002), 2)

private def setupStream(inboundContext: InboundContext, timeout: FiniteDuration = 5.seconds): (TestPublisher.Probe[AnyRef], TestSubscriber.Probe[Any]) = {
val recipient = OptionVal.None // not used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class LateConnectSpec extends AkkaSpec(LateConnectSpec.config) with ImplicitSend
"be established after initial lazy restart" in {
system.actorOf(TestActors.echoActorProps, "echoA")

val echoB = system.actorSelection(s"artery://systemB@localhost:$portB/user/echoB")
val echoB = system.actorSelection(s"akka://systemB@localhost:$portB/user/echoB")
echoB ! "ping1"

// let the outbound streams be restarted (lazy), systemB is not started yet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class OutboundControlJunctionSpec extends AkkaSpec with ImplicitSender {
val matSettings = ActorMaterializerSettings(system).withFuzzing(true)
implicit val mat = ActorMaterializer(matSettings)(system)

val addressA = UniqueAddress(Address("artery", "sysA", "hostA", 1001), 1)
val addressB = UniqueAddress(Address("artery", "sysB", "hostB", 1002), 2)
val addressA = UniqueAddress(Address("akka", "sysA", "hostA", 1001), 1)
val addressB = UniqueAddress(Address("akka", "sysB", "hostB", 1002), 2)

private val outboundEnvelopePool = ReusableOutboundEnvelope.createObjectPool(capacity = 16)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class OutboundHandshakeSpec extends AkkaSpec with ImplicitSender {
val matSettings = ActorMaterializerSettings(system).withFuzzing(true)
implicit val mat = ActorMaterializer(matSettings)(system)

val addressA = UniqueAddress(Address("artery", "sysA", "hostA", 1001), 1)
val addressB = UniqueAddress(Address("artery", "sysB", "hostB", 1002), 2)
val addressA = UniqueAddress(Address("akka", "sysA", "hostA", 1001), 1)
val addressB = UniqueAddress(Address("akka", "sysB", "hostB", 1002), 2)

private val outboundEnvelopePool = ReusableOutboundEnvelope.createObjectPool(capacity = 16)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,29 @@ class RemoteActorForSpec extends ArteryMultiNodeSpec("akka.loglevel=INFO") with

"support remote look-ups" in {
remoteSystem.actorOf(TestActors.echoActorProps, "remote-look-ups")
val remoteRef = localSystem.actorFor(s"artery://${remoteSystem.name}@localhost:$remotePort/user/remote-look-ups")
val remoteRef = localSystem.actorFor(s"akka://${remoteSystem.name}@localhost:$remotePort/user/remote-look-ups")
remoteRef ! "ping"
expectMsg("ping")
}

// FIXME does not log anything currently
"send warning message for wrong address" ignore {
filterEvents(EventFilter.warning(pattern = "Address is now gated for ", occurrences = 1)) {
localSystem.actorFor("artery://nonexistingsystem@localhost:12346/user/echo") ! "ping"
localSystem.actorFor("akka://nonexistingsystem@localhost:12346/user/echo") ! "ping"
}
}

"support ask" in {
remoteSystem.actorOf(TestActors.echoActorProps, "support-ask")
val remoteRef = localSystem.actorFor(s"artery://${remoteSystem.name}@localhost:$remotePort/user/support-ask")
val remoteRef = localSystem.actorFor(s"akka://${remoteSystem.name}@localhost:$remotePort/user/support-ask")

implicit val timeout: Timeout = 10.seconds
(remoteRef ? "ping").futureValue should ===("ping")
}

"send dead letters on remote if actor does not exist" in {
EventFilter.warning(pattern = "dead.*buh", occurrences = 1).intercept {
localSystem.actorFor(s"artery://${remoteSystem.name}@localhost:$remotePort/dead-letters-on-remote") ! "buh"
localSystem.actorFor(s"akka://${remoteSystem.name}@localhost:$remotePort/dead-letters-on-remote") ! "buh"
}(remoteSystem)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ class RemoteActorRefProviderSpec extends ArteryMultiNodeSpec {
"RemoteActorRefProvider" must {

"resolve local actor selection" in {
val sel = system.actorSelection(s"artery://${system.name}@${addressA.host.get}:${addressA.port.get}/user/echo")
val sel = system.actorSelection(s"akka://${system.name}@${addressA.host.get}:${addressA.port.get}/user/echo")
sel.anchor.asInstanceOf[InternalActorRef].isLocal should be(true)
}

"resolve remote actor selection" in {
val sel = system.actorSelection(s"artery://${systemB.name}@${addressB.host.get}:${addressB.port.get}/user/echo")
val sel = system.actorSelection(s"akka://${systemB.name}@${addressB.host.get}:${addressB.port.get}/user/echo")
sel.anchor.getClass should ===(classOf[RemoteActorRef])
sel.anchor.asInstanceOf[InternalActorRef].isLocal should be(false)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class RemoteActorSelectionSpec extends ArteryMultiNodeSpec with ImplicitSender {
akka {
remote.artery.port = $port
actor.deployment {
/looker2/child.remote = "artery://$remoteSysName@localhost:$remotePort"
/looker2/child/grandchild.remote = "artery://$localSysName@localhost:$localPort"
/looker2/child.remote = "akka://$remoteSysName@localhost:$remotePort"
/looker2/child/grandchild.remote = "akka://$localSysName@localhost:$localPort"
}
}
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class RemoteConnectionSpec extends ArteryMultiNodeSpec("akka.remote.retry-gate-c
val remotePort = temporaryServerAddress(udp = true).getPort

// try to talk to it before it is up
val selection = localSystem.actorSelection(s"artery://$nextGeneratedSystemName@localhost:$remotePort/user/echo")
val selection = localSystem.actorSelection(s"akka://$nextGeneratedSystemName@localhost:$remotePort/user/echo")
selection.tell("ping", localProbe.ref)
localProbe.expectNoMsg(1.seconds)

Expand Down Expand Up @@ -60,7 +60,7 @@ class RemoteConnectionSpec extends ArteryMultiNodeSpec("akka.remote.retry-gate-c
val remotePort = temporaryServerAddress(udp = true).getPort

// try to talk to remote before it is up
val selection = localSystem.actorSelection(s"artery://$nextGeneratedSystemName@localhost:$remotePort/user/echo")
val selection = localSystem.actorSelection(s"akka://$nextGeneratedSystemName@localhost:$remotePort/user/echo")
selection.tell("ping", localProbe.ref)
localProbe.expectNoMsg(1.seconds)

Expand All @@ -71,7 +71,7 @@ class RemoteConnectionSpec extends ArteryMultiNodeSpec("akka.remote.retry-gate-c
localProbe.expectNoMsg(2.seconds)
val otherProbe = new TestProbe(remoteSystem)
val otherSender = otherProbe.ref
val thisSelection = remoteSystem.actorSelection(s"artery://${localSystem.name}@localhost:$localPort/user/echo")
val thisSelection = remoteSystem.actorSelection(s"akka://${localSystem.name}@localhost:$localPort/user/echo")
within(5.seconds) {
awaitAssert {
thisSelection.tell("ping", otherSender)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ object RemoteDeathWatchSpec {
actor {
provider = remote
deployment {
/watchers.remote = "artery://other@localhost:$otherPort"
/watchers.remote = "akka://other@localhost:$otherPort"
}
}
remote.watch-failure-detector.acceptable-heartbeat-pause = 3s
Expand Down Expand Up @@ -54,7 +54,7 @@ class RemoteDeathWatchSpec extends AkkaSpec(RemoteDeathWatchSpec.config) with Im
// pick an unused port
val port = SocketUtil.temporaryServerAddress("localhost", udp = true).getPort
// simulate de-serialized ActorRef
val ref = rarp.resolveActorRef(s"artery://OtherSystem@localhost:$port/user/foo/bar#1752527294")
val ref = rarp.resolveActorRef(s"akka://OtherSystem@localhost:$port/user/foo/bar#1752527294")

// we don't expect real quarantine when the UID is unknown, i.e. QuarantinedEvent is not published
EventFilter.warning(pattern = "Quarantine of .* ignored because unknown UID", occurrences = 1).intercept {
Expand All @@ -73,7 +73,7 @@ class RemoteDeathWatchSpec extends AkkaSpec(RemoteDeathWatchSpec.config) with Im
}

"receive Terminated when watched node is unknown host" in {
val path = RootActorPath(Address("artery", system.name, "unknownhost", 2552)) / "user" / "subject"
val path = RootActorPath(Address("akka", system.name, "unknownhost", 2552)) / "user" / "subject"
system.actorOf(Props(new Actor {
context.watch(context.actorFor(path))
def receive = {
Expand All @@ -85,7 +85,7 @@ class RemoteDeathWatchSpec extends AkkaSpec(RemoteDeathWatchSpec.config) with Im
}

"receive ActorIdentity(None) when identified node is unknown host" in {
val path = RootActorPath(Address("artery", system.name, "unknownhost2", 2552)) / "user" / "subject"
val path = RootActorPath(Address("akka", system.name, "unknownhost2", 2552)) / "user" / "subject"
system.actorSelection(path) ! Identify(path)
expectMsg(60.seconds, ActorIdentity(path, None))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class RemoteDeploymentSpec extends AkkaSpec("""
val conf = ConfigFactory.parseString(
s"""
akka.actor.deployment {
/blub.remote = "artery://${system.name}@localhost:$port"
/blub.remote = "akka://${system.name}@localhost:$port"
}
""").withFallback(system.settings.config)

Expand All @@ -62,7 +62,7 @@ class RemoteDeploymentSpec extends AkkaSpec("""
"create and supervise children on remote node" in {
val senderProbe = TestProbe()(masterSystem)
val r = masterSystem.actorOf(Props[Echo1], "blub")
r.path.toString should ===(s"artery://${system.name}@localhost:${port}/remote/artery/${masterSystem.name}@localhost:${masterPort}/user/blub")
r.path.toString should ===(s"akka://${system.name}@localhost:${port}/remote/akka/${masterSystem.name}@localhost:${masterPort}/user/blub")

r.tell(42, senderProbe.ref)
senderProbe.expectMsg(42)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class RemoteMessageSerializationSpec extends ArteryMultiNodeSpec("""
case x sender() ! x
}
}), bigBounceId)
val bigBounceHere = localSystem.actorFor(s"artery://${remoteSystem.name}@localhost:$remotePort/user/$bigBounceId")
val bigBounceHere = localSystem.actorFor(s"akka://${remoteSystem.name}@localhost:$remotePort/user/$bigBounceId")

val eventForwarder = localSystem.actorOf(Props(new Actor {
def receive = {
Expand Down
Loading

0 comments on commit b127f1f

Please sign in to comment.