@Test public void mainError() { TestSubscriber<Long> ts = new TestSubscriber<>(Long.MAX_VALUE); Multi.<Long>error(new IOException()) .timeout(1, TimeUnit.MINUTES, executor) .subscribe(ts); ts.assertFailure(IOException.class); }
@Override public void subscribe(Flow.Subscriber<? super T> subscriber) { TimeoutSubscriber<T> parent = new TimeoutSubscriber<>(subscriber, timeout, unit, executor, fallback); subscriber.onSubscribe(parent); parent.schedule(0L); source.subscribe(parent); }
MultiTimeout implements Multi<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { TimeoutSubscriber<T> parent = new TimeoutSubscriber<>(subscriber, timeout, unit, executor, fallback); subscriber.onSubscribe(parent); parent.schedule(0L); source.subscribe(parent); } }
MultiTimeout implements Multi<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { TimeoutSubscriber<T> parent = new TimeoutSubscriber<>(subscriber, timeout, unit, executor, fallback); subscriber.onSubscribe(parent); parent.schedule(0L); source.subscribe(parent); } MultiTimeout(Multi<T> source, long timeout, TimeUnit unit,
                 ScheduledExecutorService executor, Flow.Publisher<T> fallback); }
MultiTimeout implements Multi<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { TimeoutSubscriber<T> parent = new TimeoutSubscriber<>(subscriber, timeout, unit, executor, fallback); subscriber.onSubscribe(parent); parent.schedule(0L); source.subscribe(parent); } MultiTimeout(Multi<T> source, long timeout, TimeUnit unit,
                 ScheduledExecutorService executor, Flow.Publisher<T> fallback); @Override void subscribe(Flow.Subscriber<? super T> subscriber); }
MultiTimeout implements Multi<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { TimeoutSubscriber<T> parent = new TimeoutSubscriber<>(subscriber, timeout, unit, executor, fallback); subscriber.onSubscribe(parent); parent.schedule(0L); source.subscribe(parent); } MultiTimeout(Multi<T> source, long timeout, TimeUnit unit,
                 ScheduledExecutorService executor, Flow.Publisher<T> fallback); @Override void subscribe(Flow.Subscriber<? super T> subscriber);  }