Enormous merge with master which probably led to the indirect unfortunate deaths of several kittens
This commit is contained in:
commit
e959493e12
85 changed files with 983 additions and 1333 deletions
|
|
@ -11,6 +11,7 @@ import akka.testkit.{ EventFilter, TestEvent }
|
|||
import java.net.ConnectException
|
||||
import java.nio.channels.NotYetConnectedException
|
||||
import akka.cluster.LocalCluster
|
||||
import akka.dispatch.Await
|
||||
|
||||
object DirectRoutingFailoverMultiJvmSpec {
|
||||
|
||||
|
|
@ -48,7 +49,7 @@ class DirectRoutingFailoverMultiJvmNode1 extends MasterClusterTestNode {
|
|||
}
|
||||
|
||||
LocalCluster.barrier("verify-actor", NrOfNodes) {
|
||||
(actor ? "identify").get must equal("node2")
|
||||
Await.result(actor ? "identify", timeout.duration) must equal("node2")
|
||||
}
|
||||
|
||||
val timer = Timer(30.seconds, true)
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import java.util.{ Collections, Set ⇒ JSet }
|
|||
import java.net.ConnectException
|
||||
import java.nio.channels.NotYetConnectedException
|
||||
import akka.cluster.LocalCluster._
|
||||
import akka.dispatch.Await
|
||||
|
||||
object RandomFailoverMultiJvmSpec {
|
||||
|
||||
|
|
@ -91,7 +92,7 @@ class RandomFailoverMultiJvmNode1 extends MasterClusterTestNode {
|
|||
def identifyConnections(actor: ActorRef): JSet[String] = {
|
||||
val set = new java.util.HashSet[String]
|
||||
for (i ← 0 until 100) { // we should get hits from both nodes in 100 attempts, if not then not very random
|
||||
val value = (actor ? "identify").get.asInstanceOf[String]
|
||||
val value = Await.result(actor ? "identify", timeout.duration).asInstanceOf[String]
|
||||
set.add(value)
|
||||
}
|
||||
set
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import akka.actor._
|
|||
import akka.config.Config
|
||||
import Cluster._
|
||||
import akka.cluster.LocalCluster._
|
||||
import akka.dispatch.Await
|
||||
|
||||
/**
|
||||
* When a MultiJvmNode is started, will it automatically be part of the cluster (so will it automatically be eligible
|
||||
|
|
@ -78,7 +79,7 @@ class Random3ReplicasMultiJvmNode2 extends ClusterTestNode {
|
|||
}
|
||||
|
||||
for (i ← 0 until 1000) {
|
||||
count((hello ? "Hello").as[String].getOrElse(fail("Should have recieved reply from a node")))
|
||||
count(Await.result((hello ? "Hello").mapTo[String], 10 seconds))
|
||||
}
|
||||
|
||||
val repliesNode1 = replies("World from node [node1]")
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import java.net.ConnectException
|
|||
import java.nio.channels.NotYetConnectedException
|
||||
import java.lang.Thread
|
||||
import akka.cluster.LocalCluster._
|
||||
import akka.dispatch.Await
|
||||
|
||||
object RoundRobinFailoverMultiJvmSpec {
|
||||
|
||||
|
|
@ -94,7 +95,7 @@ class RoundRobinFailoverMultiJvmNode1 extends MasterClusterTestNode {
|
|||
def identifyConnections(actor: ActorRef): JSet[String] = {
|
||||
val set = new java.util.HashSet[String]
|
||||
for (i ← 0 until 100) {
|
||||
val value = (actor ? "identify").get.asInstanceOf[String]
|
||||
val value = Await.result(actor ? "identify", timeout.duration).asInstanceOf[String]
|
||||
set.add(value)
|
||||
}
|
||||
set
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import akka.cluster.LocalCluster._
|
|||
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import akka.dispatch.Await
|
||||
|
||||
/**
|
||||
* When a MultiJvmNode is started, will it automatically be part of the cluster (so will it automatically be eligible
|
||||
|
|
@ -107,14 +108,8 @@ class RoundRobin2ReplicasMultiJvmNode2 extends ClusterTestNode {
|
|||
|
||||
implicit val timeout = Timeout(Duration(20, "seconds"))
|
||||
|
||||
count((hello ? "Hello").as[String].getOrElse(fail("Should have recieved reply from node1")))
|
||||
count((hello ? "Hello").as[String].getOrElse(fail("Should have recieved reply from node2")))
|
||||
count((hello ? "Hello").as[String].getOrElse(fail("Should have recieved reply from node1")))
|
||||
count((hello ? "Hello").as[String].getOrElse(fail("Should have recieved reply from node2")))
|
||||
count((hello ? "Hello").as[String].getOrElse(fail("Should have recieved reply from node1")))
|
||||
count((hello ? "Hello").as[String].getOrElse(fail("Should have recieved reply from node2")))
|
||||
count((hello ? "Hello").as[String].getOrElse(fail("Should have recieved reply from node1")))
|
||||
count((hello ? "Hello").as[String].getOrElse(fail("Should have recieved reply from node2")))
|
||||
for(i <- 1 to 8)
|
||||
count(Await.result((hello ? "Hello").mapTo[String], timeout.duration))
|
||||
|
||||
replies.get("World from node [node1]").get must equal(4)
|
||||
replies.get("World from node [node2]").get must equal(4)
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import java.nio.channels.NotYetConnectedException
|
|||
import java.lang.Thread
|
||||
import akka.routing.Routing.Broadcast
|
||||
import akka.cluster.LocalCluster._
|
||||
import akka.dispatch.Await
|
||||
|
||||
object ScatterGatherFailoverMultiJvmSpec {
|
||||
|
||||
|
|
@ -84,7 +85,7 @@ class ScatterGatherFailoverMultiJvmNode1 extends MasterClusterTestNode {
|
|||
def identifyConnections(actor: ActorRef): JSet[String] = {
|
||||
val set = new java.util.HashSet[String]
|
||||
for (i ← 0 until NrOfNodes * 2) {
|
||||
val value = (actor ? "foo").get.asInstanceOf[String]
|
||||
val value = Await.result(actor ? "foo", timeout.duration).asInstanceOf[String]
|
||||
set.add(value)
|
||||
}
|
||||
set
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue