예제 #1
0
        public void TestRedistributeUnconfirmed()
        {
            var allOtherNodes = Config.AllOtherNodes(_localNodeId).ToList();

            var channel2 = _channelProvider.ChannelFor(allOtherNodes[0].Id);

            Mock(channel2).Until = TestUntil.Happenings(1);

            var channel3 = _channelProvider.ChannelFor(allOtherNodes[1].Id);

            Mock(channel3).Until = TestUntil.Happenings(1);

            var set     = AttributeSet.Named("test-set");
            var tracked = set.AddIfAbsent(Attribute <string> .From("test-attr", "test-value"));

            _confirmingDistributor.Distribute(set, tracked, ApplicationMessageType.AddAttribute);

            _confirmingDistributor.RedistributeUnconfirmed();

            Mock(channel2).Until.Completes();
            Assert.Single(Mock(channel2).Writes);

            Mock(channel3).Until.Completes();
            Assert.Single(Mock(channel3).Writes);
        }
예제 #2
0
    //=========================================
    // Scheduled
    //=========================================

    #region Scheduled

    public void IntervalSignal(IScheduled <object> scheduled, object data) => _confirmingDistributor.RedistributeUnconfirmed();