public void ClusterSingletonManager_should_startup_6_node_cluster()
{
AwaitClusterUp(_controller, _observer, _first, _second, _third, _fourth, _fifth, _sixth);
Within(TimeSpan.FromSeconds(60), () =>
{
var memberProbe = CreateTestProbe();
Cluster.Subscribe(memberProbe.Ref, new[] { typeof(ClusterEvent.MemberUp) });
memberProbe.ExpectMsg<ClusterEvent.CurrentClusterState>();
RunOn(() =>
{
// watch that it is not terminated, which would indicate misbehaviour
Watch(Sys.ActorOf(Props.Create<PointToPointChannel>(), "queue"));
}, _controller);
EnterBarrier("queue-started");
Join(_first, _first);
AwaitMemberUp(memberProbe, _first);
VerifyRegistration(_first);
VerifyMsg(_first, Msg);
// join the observer node as well, which should not influence since it doesn't have the "worker" role
Join(_observer, _first);
AwaitMemberUp(memberProbe, _observer, _first);
VerifyProxyMsg(_first, _first, Msg);
Join(_second, _first);
AwaitMemberUp(memberProbe, _second, _observer, _first);
VerifyMsg(_first, Msg);
VerifyProxyMsg(_first, _second, Msg);
Join(_third, _first);
AwaitMemberUp(memberProbe, _third, _second, _observer, _first);
VerifyMsg(_first, Msg);
VerifyProxyMsg(_first, _third, Msg);
Join(_fourth, _first);
AwaitMemberUp(memberProbe, _fourth, _third, _second, _observer, _first);
VerifyMsg(_first, Msg);
VerifyProxyMsg(_first, _fourth, Msg);
Join(_fifth, _first);
AwaitMemberUp(memberProbe, _fifth, _fourth, _third, _second, _observer, _first);
VerifyMsg(_first, Msg);
VerifyProxyMsg(_first, _fifth, Msg);
Join(_sixth, _first);
AwaitMemberUp(memberProbe, _sixth, _fifth, _fourth, _third, _second, _observer, _first);
VerifyMsg(_first, Msg);
VerifyProxyMsg(_first, _sixth, Msg);
});
}