Akka.Tests.Routing.RoundRobinSpec.RoundRobin_must_be_able_to_shut_down_its_instance C# (CSharp) Метод

RoundRobin_must_be_able_to_shut_down_its_instance() приватный Метод

private RoundRobin_must_be_able_to_shut_down_its_instance ( ) : void
Результат void
        public void RoundRobin_must_be_able_to_shut_down_its_instance()
        {
            const int routeeCount = 7;
            var testLatch = new TestLatch(routeeCount);
            var router = Sys.ActorOf(new RoundRobinPool(routeeCount).Props(Props.Create(() => new HelloWorldActor(testLatch))));
            router.Tell("hello", TestActor);
            router.Tell("hello", TestActor);
            router.Tell("hello", TestActor);
            router.Tell("hello", TestActor);
            router.Tell("hello", TestActor);

            Within(TimeSpan.FromSeconds(2), () =>
            {
                ExpectMsg("world");
                ExpectMsg("world");
                ExpectMsg("world");
                ExpectMsg("world");
                ExpectMsg("world");
                return true;
            });

            Sys.Stop(router);
            testLatch.Ready(TimeSpan.FromSeconds(5));
        }