Пример #1
0
        private void ProcessElections()
        {
            var gossipUpdate = new GossipMessage.GossipUpdated(_electionsUnit.ClusterInfo);

            _electionsUnit.Publish(gossipUpdate);

            _electionsUnit.Publish(new ElectionMessage.StartElections());

            _electionsUnit.RepublishFromPublisher();

            _electionsUnit.RepublishFromPublisher();
            Assert.That(
                _electionsUnit.Publisher.Messages.All(x => x is HttpMessage.SendOverHttp || x is TimerMessage.Schedule),
                Is.True,
                "Only OverHttp or Schedule messages are expected.");

            _electionsUnit.RepublishFromPublisher();

            _electionsUnit.RepublishFromPublisher();
            Assert.That(
                _electionsUnit.Publisher.Messages.All(x => x is HttpMessage.SendOverHttp || x is TimerMessage.Schedule),
                Is.True,
                "Only OverHttp or Schedule messages are expected.");

            _electionsUnit.RepublishFromPublisher();
        }
Пример #2
0
        private void ProcessElections()
        {
            var gossipUpdate = new GossipMessage.GossipUpdated(_electionsUnit.ClusterInfo);

            _electionsUnit.Publish(gossipUpdate);

            _electionsUnit.Publish(new ElectionMessage.StartElections());

            _electionsUnit.RepublishFromPublisher();
        }