public ConfirmablesTest(ITestOutputHelper output) : base(output)
        {
            _localNodeId = Id.Of(1);

            _localNode = Config.NodeMatching(_localNodeId);

            _remoteNode2 = Config.NodeMatching(Id.Of(2));

            _remoteNode3 = Config.NodeMatching(Id.Of(3));

            _set = AttributeSet.Named("test-set");

            _tracked = _set.AddIfAbsent(Attribute <string> .From("test-attr", "test-value"));

            _consumables = new Confirmables(_localNode, Config.AllOtherNodes(_localNodeId));
        }
Beispiel #2
0
        public ConfirmingDistributorTest(ITestOutputHelper output) : base(output)
        {
            _localNodeId = Id.Of(1);

            _localNode = Config.NodeMatching(_localNodeId);

            _set = AttributeSet.Named("test-set");

            _tracked = _set.AddIfAbsent(Attribute <string> .From("test-attr", "test-value"));

            _channelProvider = new MockManagedOutboundChannelProvider(_localNodeId, Config);

            var pool = new ConsumerByteBufferPool(ElasticResourcePool <IConsumerByteBuffer, string> .Config.Of(10), Properties.OperationalBufferSize());

            var outboundStream = TestWorld.ActorFor <IOperationalOutboundStream>(
                () => new OperationalOutboundStreamActor(_localNode, _channelProvider, pool));

            _confirmingDistributor = new ConfirmingDistributor(Application, _localNode, outboundStream.Actor, Config);
        }
Beispiel #3
0
        public AttributesAgentActorTest(ITestOutputHelper output) : base(output)
        {
            _localNodeId = Id.Of(1);

            _localNode = Config.NodeMatching(_localNodeId);

            _set = AttributeSet.Named("test-set");

            _tracked = _set.AddIfAbsent(Attribute <string> .From("test-attr", "test-value"));

            _channelProvider = new MockManagedOutboundChannelProvider(_localNodeId, Config);

            _pool = new ByteBufferPool(10, Properties.OperationalBufferSize());

            _interest = new MockConfirmationInterest();

            _outboundStream =
                TestWorld.ActorFor <IOperationalOutboundStream>(
                    Definition.Has <OperationalOutboundStreamActor>(
                        Definition.Parameters(_localNode, _channelProvider, _pool)));
        }