예제 #1
0
 public void SplitWhen_must_support_eager_cancellation_of_master_stream_on_cancelling_substreams()
 {
     this.AssertAllStagesStopped(() =>
     {
         WithSubstreamsSupport(5, 8, SubstreamCancelStrategy.Propagate,
                               (masterSubscriber, masterSubscription, expectSubFlow) =>
         {
             var s1 = new StreamPuppet(expectSubFlow().RunWith(Sink.AsPublisher <int>(false), Materializer),
                                       this);
             s1.Cancel();
             masterSubscriber.ExpectComplete();
         });
     }, Materializer);
 }
예제 #2
0
        public void SplitWhen_must_support_cancelling_substreams()
        {
            this.AssertAllStagesStopped(() =>
            {
                WithSubstreamsSupport(5, 8, run: (masterSubscriber, masterSubscription, getSubFlow) =>
                {
                    var s1 = new StreamPuppet(getSubFlow().RunWith(Sink.AsPublisher <int>(false), Materializer), this);
                    s1.Cancel();
                    var s2 = new StreamPuppet(getSubFlow().RunWith(Sink.AsPublisher <int>(false), Materializer), this);

                    s2.Request(4);
                    s2.ExpectNext(5);
                    s2.ExpectNext(6);
                    s2.ExpectNext(7);
                    s2.ExpectNext(8);
                    s2.Request(1);
                    s2.ExpectComplete();

                    masterSubscription.Request(1);
                    masterSubscriber.ExpectComplete();
                });
            }, Materializer);
        }
예제 #3
0
 public void SplitAfter_must_support_eager_cancellation_of_master_stream_on_cancelling_substreams()
 {
     this.AssertAllStagesStopped(() =>
     {
         WithSubstreamsSupport(5,8,SubstreamCancelStrategy.Propagate,
             (masterSubscriber, masterSubscription, expectSubFlow) =>
             {
                 var s1 = new StreamPuppet(expectSubFlow().RunWith(Sink.AsPublisher<int>(false), Materializer),
                     this);
                 s1.Cancel();
                 masterSubscriber.ExpectComplete();
             });
     }, Materializer);
 }
예제 #4
0
        public void SplitWhen_must_support_cancelling_substreams()
        {
            this.AssertAllStagesStopped(() =>
            {
                WithSubstreamsSupport(5, 8, run: (masterSubscriber, masterSubscription, getSubFlow) =>
                {
                    var s1 = new StreamPuppet(getSubFlow().RunWith(Sink.AsPublisher<int>(false), Materializer), this);
                    s1.Cancel();
                    var s2 = new StreamPuppet(getSubFlow().RunWith(Sink.AsPublisher<int>(false), Materializer), this);

                    s2.Request(4);
                    s2.ExpectNext(5);
                    s2.ExpectNext(6);
                    s2.ExpectNext(7);
                    s2.ExpectNext(8);
                    s2.Request(1);
                    s2.ExpectComplete();

                    masterSubscription.Request(1);
                    masterSubscriber.ExpectComplete();
                });
            }, Materializer);
        }