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); }
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); }
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>())); }
public override IPublisher <int> CreatePublisher(long elements) { return(Flowable.Never <int>().Timeout(TimeSpan.FromMilliseconds(1), Flowable.Range(1, (int)elements))); }
public override IPublisher <int> CreatePublisher(long elements) { return(Flowable.Amb(Flowable.Never <int>(), Flowable.Range(1, (int)elements))); }