コード例 #1
0
        public MemberWeaklyUpConfig()
        {
            First  = Role("first");
            Second = Role("second");
            Third  = Role("third");
            Fourth = Role("fourth");
            Fifth  = Role("fifth");

            CommonConfig = DebugConfig(on: false)
                           .WithFallback(ConfigurationFactory.ParseString(@"
                    akka.remote.retry-gate-closed-for = 3s
                    akka.cluster.allow-weakly-up-members = on"))
                           .WithFallback(MultiNodeClusterSpec.ClusterConfig());

            TestTransport = true;
        }
コード例 #2
0
        public JoinInProgressMultiNodeConfig()
        {
            _first  = Role("first");
            _second = Role("second");

            CommonConfig = MultiNodeLoggingConfig.LoggingConfig.WithFallback(DebugConfig(true)).WithFallback(
                ConfigurationFactory.ParseString(@"
                    akka.stdout-loglevel = DEBUG
                    akka.cluster {
                        # simulate delay in gossip by turning it off
                        gossip-interval = 300 s
                        failure-detector {
                            threshold = 4
                            acceptable-heartbeat-pause = 1 second
                        }
                    }").WithFallback(MultiNodeClusterSpec.ClusterConfig()));
        }
コード例 #3
0
        public InitialHeartbeatMultiNodeConfig()
        {
            _controller = Role("controller");
            _first      = Role("first");
            _second     = Role("second");

            CommonConfig = DebugConfig(false)
                           .WithFallback(MultiNodeLoggingConfig.LoggingConfig)
                           .WithFallback(
                ConfigurationFactory.ParseString(@"
                    akka.testconductor.barrier-timeout = 60 s
                    akka.stdout-loglevel = DEBUG
                    akka.cluster.failure-detector.threshold = 4
                    ").WithFallback(MultiNodeClusterSpec.ClusterConfig()));

            TestTransport = true;
        }
コード例 #4
0
        public SplitBrainConfig(bool failureDetectorPuppet)
        {
            First  = Role("first");
            Second = Role("second");
            Third  = Role("third");
            Fourth = Role("fourth");
            Fifth  = Role("fifth");

            CommonConfig = DebugConfig(false)
                           .WithFallback(ConfigurationFactory.ParseString(@"
                    akka.remote.retry-gate-closed-for = 3s
                    akka.cluster.auto-down-unreachable-after = 1s
                    akka.cluster.failure-detector.threshold = 4
                "))
                           .WithFallback(MultiNodeClusterSpec.ClusterConfig(failureDetectorPuppet));

            TestTransport = true;
        }
コード例 #5
0
        public SurviveNetworkInstabilitySpecConfig()
        {
            First   = Role("first");
            Second  = Role("second");
            Third   = Role("third");
            Fourth  = Role("fourth");
            Fifth   = Role("fifth");
            Sixth   = Role("sixth");
            Seventh = Role("seventh");
            Eighth  = Role("eighth");

            CommonConfig = DebugConfig(false)
                           .WithFallback(ConfigurationFactory.ParseString(@"
                    akka.remote.system-message-buffer-size = 100
                    akka.remote.dot-netty.tcp.connection-timeout = 10s
                "))
                           .WithFallback(MultiNodeClusterSpec.ClusterConfig());

            TestTransport = true;
        }
コード例 #6
0
        public SplitBrainDowningSpecConfig()
        {
            First  = Role("first");
            Second = Role("second");
            Third  = Role("third");
            Fourth = Role("fourth");
            Fifth  = Role("fifth");

            TestTransport = true;
            CommonConfig  = DebugConfig(false)
                            .WithFallback(ConfigurationFactory.ParseString(@"
                akka {
                    cluster {
                        down-removal-margin = 1s
                        downing-provider-class = ""Akka.Cluster.SplitBrainResolver, Akka.Cluster""
                        split-brain-resolver {
                            stable-after = 1s
                            active-strategy = keep-majority
                        }
                    }
                }"))
                            .WithFallback(MultiNodeClusterSpec.ClusterConfig());
        }
コード例 #7
0
        public MinMembersOfRoleBeforeUpSpecConfig()
        {
            First  = Role("first");
            Second = Role("second");
            Third  = Role("third");

            CommonConfig = ConfigurationFactory.ParseString(@"
                akka.cluster.role.backend.min-nr-of-members = 2
            ").WithFallback(MultiNodeClusterSpec.ClusterConfigWithFailureDetectorPuppet());

            NodeConfig(new List <RoleName> {
                First
            }, new List <Config>
            {
                ConfigurationFactory.ParseString("akka.cluster.roles =[frontend]")
            });

            NodeConfig(new List <RoleName> {
                Second, Third
            }, new List <Config>
            {
                ConfigurationFactory.ParseString("akka.cluster.roles =[backend]")
            });
        }
コード例 #8
0
 public RoleNameComparer(MultiNodeClusterSpec spec)
 {
     _spec = spec;
 }