/** * Concatenate the values in order from a sequence of Solo sources, delaying * errors till all sources terminate. * @param <T> the common base value type * @param sources the sequence of sources * @param prefetch the number of sources to prefetch from upstream * @return the new Flowable instance */ public static <T> Flowable<T> concatDelayError(Publisher<? extends Solo<? extends T>> sources, int prefetch) { return concatDelayError(sources, prefetch, true); }
/** * Concatenate the values in order from a sequence of Solo sources, delaying * errors till all sources terminate. * @param <T> the common base value type * @param sources the sequence of sources * @return the new Flowable instance */ public static <T> Flowable<T> concatDelayError(Publisher<? extends Solo<? extends T>> sources) { return concatDelayError(sources, 2, true); }
/** * Concatenate the values in order from a sequence of Solo sources, delaying * errors till all sources terminate. * @param <T> the common base value type * @param sources the sequence of sources * @return the new Flowable instance */ public static <T> Flowable<T> concatDelayError(Publisher<? extends Solo<? extends T>> sources) { return concatDelayError(sources, 2, true); }
/** * Concatenate the values in order from a sequence of Solo sources, delaying * errors till all sources terminate. * @param <T> the common base value type * @param sources the sequence of sources * @param prefetch the number of sources to prefetch from upstream * @return the new Flowable instance */ public static <T> Flowable<T> concatDelayError(Publisher<? extends Solo<? extends T>> sources, int prefetch) { return concatDelayError(sources, prefetch, true); }
@SuppressWarnings("unchecked") @Test public void concatIterableDelayErrorError2() { Solo.concatDelayError(Arrays.asList(Solo.error(new IOException()), Solo.just(2))) .test() .assertFailure(IOException.class); }
@SuppressWarnings("unchecked") @Test public void concatIterableDelayErrorError() { Solo.concatDelayError(Arrays.asList(Solo.just(1), Solo.error(new IOException()))) .test() .assertFailure(IOException.class, 1); }
@SuppressWarnings("unchecked") @Test public void concatIterableDelayError() { Solo.concatDelayError(Arrays.asList(Solo.just(1), Solo.just(2))) .test() .assertResult(1, 2); }
@Test public void concatDelayErrorPublisherError2() { Solo.concatDelayError(Flowable.just(Solo.error(new IOException()), Solo.just(2))) .test() .assertFailure(IOException.class); }
@Test public void concatDelayErrorPublisherError() { Solo.concatDelayError(Flowable.just(Solo.just(1), Solo.error(new IOException()))) .test() .assertFailure(IOException.class, 1); }
@Test public void concatDelayErrorPublisherError3() { Solo.concatDelayError( Flowable.just(Solo.just(1)) .concatWith(Flowable.<Solo<Integer>>error(new IOException())) ) .test() .assertFailure(IOException.class, 1); }
@Test public void concatDelayErrorPublisher() { Solo.concatDelayError(Flowable.just(Solo.just(1), Solo.just(2))) .test() .assertResult(1, 2); }
@Test public void concatDelayErrorPublisherPrefetch() { Solo.concatDelayError(Flowable.just(Solo.just(1), Solo.just(2)), 1) .test() .assertResult(1, 2); }