コード例 #1
0
        public void SetUp()
        {
            var clusterSettings = ClusterSettingsFactory.GetClusterSettings(1, 3, false);

            _electionsUnit = new ElectionsServiceUnit(clusterSettings);

            ProcessElections();
        }
コード例 #2
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();
        }
コード例 #3
0
ファイル: no_quorum_cases.cs プロジェクト: kirinse/EventStore
        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();
        }