예제 #1
0
        public ApplicationOutboundStreamTest(ITestOutputHelper output) : base(output)
        {
            _world = TestWorld.Start("test-outbound-stream");

            var localNodeId = Id.Of(1);

            _channelProvider = new MockManagedOutboundChannelProvider(localNodeId, Config);

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

            _outboundStream =
                _world.ActorFor <IApplicationOutboundStream>(
                    () => new ApplicationOutboundStreamActor(_channelProvider, pool));
        }
        public ApplicationOutboundStreamTest(ITestOutputHelper output) : base(output)
        {
            _world = TestWorld.Start("test-outbound-stream");

            _localNodeId = Id.Of(1);

            _channelProvider = new MockManagedOutboundChannelProvider(_localNodeId, Config);

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

            _outboundStream =
                _world.ActorFor <IApplicationOutboundStream>(
                    Definition.Has <ApplicationOutboundStreamActor>(
                        Definition.Parameters(_channelProvider, _pool)));
        }
예제 #3
0
        public OperationalOutboundStreamTest(ITestOutputHelper output) : base(output)
        {
            _world = TestWorld.Start("test-outbound-stream");

            _localNodeId = Id.Of(1);

            _localNode = Config.NodeMatching(_localNodeId);

            _channelProvider = new MockManagedOutboundChannelProvider(_localNodeId, Config);

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

            _outboundStream =
                _world.ActorFor <IOperationalOutboundStream>(
                    Definition.Has <OperationalOutboundStreamActor>(Definition.Parameters(_localNode, _channelProvider, pool)));
        }
예제 #4
0
 public OutboundTest(ITestOutputHelper output) : base(output)
 {
     _pool            = new ByteBufferPool(10, Properties.OperationalBufferSize());
     _channelProvider = new MockManagedOutboundChannelProvider(Id.Of(1), Config);
     _outbound        = new Outbound(_channelProvider, new ByteBufferPool(10, 10_000));
 }
예제 #5
0
 public OutboundTest(ITestOutputHelper output) : base(output)
 {
     _pool            = new ConsumerByteBufferPool(ElasticResourcePool <IConsumerByteBuffer, Nothing> .Config.Of(10), Properties.OperationalBufferSize());
     _channelProvider = new MockManagedOutboundChannelProvider(Id.Of(1), Config);
     _outbound        = new Outbound(_channelProvider, new ConsumerByteBufferPool(ElasticResourcePool <IConsumerByteBuffer, Nothing> .Config.Of(10), 10_000));
 }