replace unicode arrows

* ⇒, →, ←
* because we don't want to show them in documentation snippets and
  then it's complicated to avoid that when snippets are
  located in src/test/scala in individual modules
* dont replace object `→` in FSM.scala and PersistentFSM.scala
This commit is contained in:
Patrik Nordwall 2019-02-09 15:25:39 +01:00
parent e4d38f92a4
commit 5c96a5f556
1521 changed files with 18846 additions and 18786 deletions

View file

@ -29,7 +29,7 @@ object ClusterShardingLeavingSpec {
class Entity extends Actor {
def receive = {
case Ping(_) sender() ! self
case Ping(_) => sender() ! self
}
}
@ -39,17 +39,17 @@ object ClusterShardingLeavingSpec {
class ShardLocations extends Actor {
var locations: Locations = _
def receive = {
case GetLocations sender() ! locations
case l: Locations locations = l
case GetLocations => sender() ! locations
case l: Locations => locations = l
}
}
val extractEntityId: ShardRegion.ExtractEntityId = {
case m @ Ping(id) (id, m)
case m @ Ping(id) => (id, m)
}
val extractShardId: ShardRegion.ExtractShardId = {
case Ping(id: String) id.charAt(0).toString
case Ping(id: String) => id.charAt(0).toString
}
}
@ -108,12 +108,12 @@ abstract class ClusterShardingLeavingSpec(config: ClusterShardingLeavingSpecConf
"akka.cluster.sharding.distributed-data.durable.lmdb.dir")).getParentFile)
override protected def atStartup(): Unit = {
storageLocations.foreach(dir if (dir.exists) FileUtils.deleteQuietly(dir))
storageLocations.foreach(dir => if (dir.exists) FileUtils.deleteQuietly(dir))
enterBarrier("startup")
}
override protected def afterTermination(): Unit = {
storageLocations.foreach(dir if (dir.exists) FileUtils.deleteQuietly(dir))
storageLocations.foreach(dir => if (dir.exists) FileUtils.deleteQuietly(dir))
}
val cluster = Cluster(system)
@ -123,7 +123,7 @@ abstract class ClusterShardingLeavingSpec(config: ClusterShardingLeavingSpecConf
cluster join node(to).address
startSharding()
within(15.seconds) {
awaitAssert(cluster.state.members.exists { m
awaitAssert(cluster.state.members.exists { m =>
m.uniqueAddress == cluster.selfUniqueAddress && m.status == MemberStatus.Up
} should be(true))
}
@ -175,10 +175,10 @@ abstract class ClusterShardingLeavingSpec(config: ClusterShardingLeavingSpecConf
"initialize shards" in {
runOn(first) {
val shardLocations = system.actorOf(Props[ShardLocations], "shardLocations")
val locations = (for (n 1 to 10) yield {
val locations = (for (n <- 1 to 10) yield {
val id = n.toString
region ! Ping(id)
id expectMsgType[ActorRef]
id -> expectMsgType[ActorRef]
}).toMap
shardLocations ! Locations(locations)
}
@ -205,7 +205,7 @@ abstract class ClusterShardingLeavingSpec(config: ClusterShardingLeavingSpecConf
awaitAssert {
val probe = TestProbe()
originalLocations.foreach {
case (id, ref)
case (id, ref) =>
region.tell(Ping(id), probe.ref)
if (ref.path.address == firstAddress)
probe.expectMsgType[ActorRef](1.second) should not be (ref)