Akka.Cluster.Tools.Tests.Singleton.ClusterSingletonManagerSpec.ClusterSingletonManager_should_handover_when_oldest_leaves_in_6_node_cluster C# (CSharp) Метод

ClusterSingletonManager_should_handover_when_oldest_leaves_in_6_node_cluster() публичный Метод

        public void ClusterSingletonManager_should_handover_when_oldest_leaves_in_6_node_cluster()
        {
            ClusterSingletonManager_should_let_the_proxy_messages_to_the_singleton_in_a_6_node_cluster();

            Within(TimeSpan.FromSeconds(30), () =>
            {
                var leaveNode = _first;
                var newOldestNode = _second;

                RunOn(() =>
                {
                    Cluster.Leave(Node(leaveNode).Address);
                }, leaveNode);

                VerifyRegistration(_second);
                VerifyMsg(_second, Msg);
                VerifyProxyMsg(_second, _second, Msg);
                VerifyProxyMsg(_second, _third, Msg);
                VerifyProxyMsg(_second, _fourth, Msg);
                VerifyProxyMsg(_second, _fifth, Msg);
                VerifyProxyMsg(_second, _sixth, Msg);

                RunOn(() =>
                {
                    Sys.ActorSelection("/user/consumer").Tell(new Identify("singleton"), _identifyProbe.Ref);
                    _identifyProbe.ExpectMsg<ActorIdentity>(i =>
                    {
                        if (i.MessageId.Equals("singleton") && i.Subject != null)
                        {
                            Watch(i.Subject);
                            ExpectTerminated(i.Subject);
                        }
                    });
                }, leaveNode);
                EnterBarrier("after-leave");
            });
        }