예제 #1
0
 public void Fallback()
 {
     Flowable.Never <int>().Timeout(TimeSpan.FromMilliseconds(100), Flowable.Range(1, 5))
     .Test()
     .AwaitDone(TimeSpan.FromSeconds(5))
     .AssertResult(1, 2, 3, 4, 5);
 }
예제 #2
0
        WeakReference <TestSubscriber <int> > RunLeak()
        {
            TestSubscriber <int> ts = new TestSubscriber <int>(1);
            WeakReference <TestSubscriber <int> > wr = new WeakReference <TestSubscriber <int> >(ts);

            //Flowable.Range(1, 10)
            Flowable.Never <int>().Timeout(TimeSpan.FromSeconds(100))
            .Subscribe(ts);

            ts.Cancel();

            return(wr);
        }
예제 #3
0
        public void Backpressure()
        {
            var ts = Flowable.Just(1).ConcatWith(Flowable.Never <int>())
                     .Timeout(TimeSpan.FromMilliseconds(1), Flowable.Just(2))
                     .Test(1);

            Thread.Sleep(100);

            ts.AssertValues(1)
            .AssertNoError()
            .AssertNotComplete()
            .RequestMore(1)
            .AwaitDone(TimeSpan.FromSeconds(5))
            .AssertResult(1, 2);
        }
 public override IPublisher <int> CreatePublisher(long elements)
 {
     return(Flowable.Range(1, (int)elements).TakeUntil(Flowable.Never <int>()));
 }
예제 #5
0
 public override IPublisher <int> CreatePublisher(long elements)
 {
     return(Flowable.Never <int>().Timeout(TimeSpan.FromMilliseconds(1), Flowable.Range(1, (int)elements)));
 }
예제 #6
0
 public override IPublisher <int> CreatePublisher(long elements)
 {
     return(Flowable.Amb(Flowable.Never <int>(), Flowable.Range(1, (int)elements)));
 }