GetClusterSettings() public method

public GetClusterSettings ( int selfIndex, int nodesCount ) : EventStore.Core.Tests.Services.ElectionsService.ClusterSettings
selfIndex int
nodesCount int
return EventStore.Core.Tests.Services.ElectionsService.ClusterSettings
Beispiel #1
0
        public void SetUp()
        {
            var clusterSettingsFactory = new ClusterSettingsFactory();
            var clusterSettings        = clusterSettingsFactory.GetClusterSettings(1, 3, false);

            _electionsUnit = new ElectionsServiceUnit(clusterSettings);

            ProcessElections();
        }
        public void SetUp()
        {
            var clusterSettingsFactory = new ClusterSettingsFactory();
            var clusterSettings = clusterSettingsFactory.GetClusterSettings(1, 3);

            _electionsUnit = new ElectionsServiceUnit(clusterSettings);

            ProcessElections();
        }
Beispiel #3
0
        public void SetUp()
        {
            var clusterSettings = ClusterSettingsFactory.GetClusterSettings(1, 3, false);

            _electionsUnit = new ElectionsServiceUnit(clusterSettings);
            _electionsUnit.UpdateClusterMemberInfo(0, isAlive: false);
            _electionsUnit.UpdateClusterMemberInfo(2, isAlive: false);
            _electionsUnit.UpdateClusterMemberInfo(3, isAlive: false);

            ProcessElections();
        }
Beispiel #4
0
        public void SetUp()
        {
            var clusterSettingsFactory = new ClusterSettingsFactory();
            var clusterSettings        = clusterSettingsFactory.GetClusterSettings(1, 4, true);

            _electionsUnit = new ElectionsServiceUnit(clusterSettings);
            _electionsUnit.UpdateClusterMemberInfo(0, isAlive: true);
            _electionsUnit.UpdateClusterMemberInfo(1, isAlive: true);
            // Kill the other two nodes in the cluster
            _electionsUnit.UpdateClusterMemberInfo(2, isAlive: false);
            _electionsUnit.UpdateClusterMemberInfo(3, isAlive: false);

            StartElections();
        }
        public void SetUp()
        {
            var clusterSettingsFactory = new ClusterSettingsFactory();
            var clusterSettings = clusterSettingsFactory.GetClusterSettings(1, 3);

            _electionsUnit = new ElectionsServiceUnit(clusterSettings);
            _electionsUnit.UpdateClusterMemberInfo(0, isAlive: false);
            _electionsUnit.UpdateClusterMemberInfo(2, isAlive: false);
            _electionsUnit.UpdateClusterMemberInfo(3, isAlive: false);

            ProcessElections();
        }