Akka.Cluster.Tests.MultiNode.DisallowJoinOfTwoClusterSpec.Three_different_clusters_must_not_be_able_to_join C# (CSharp) Method

Three_different_clusters_must_not_be_able_to_join() private method

private Three_different_clusters_must_not_be_able_to_join ( ) : void
return void
        public void Three_different_clusters_must_not_be_able_to_join()
        {
            RunOn(() =>
            {
                StartClusterNode();
            }, _config.a1, _config.b1, _config.c1);
            EnterBarrier("first-started");

            RunOn(() =>
            {
                Cluster.Join(GetAddress(_config.a1));
            }, _config.a1, _config.a2);

            RunOn(() =>
            {
                Cluster.Join(GetAddress(_config.b1));
            }, _config.b1, _config.b2);

            RunOn(() =>
            {
                Cluster.Join(GetAddress(_config.c1));
            }, _config.c1);

            int expectedSize = Myself == _config.c1 ? 1 : 2;
            AwaitMembersUp(expectedSize);

            EnterBarrier("two-members");

            RunOn(() =>
            {
                Cluster.Join(GetAddress(_config.a1));
            }, _config.b1);

            RunOn(() =>
            {
                Cluster.Join(GetAddress(_config.c1));
            }, _config.b2);

            RunOn(() =>
            {
                Cluster.Join(GetAddress(_config.a2));
            }, _config.c1);

            foreach (var _ in Enumerable.Range(1, 5))
            {
                ClusterView.Members.Count.ShouldBe(expectedSize);
                Thread.Sleep(1000);
            }

            EnterBarrier("after-1");
        }
    }