/** * Merge the values in arbitrary 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> mergeDelayError(Iterable<? extends Solo<? extends T>> sources) { return mergeDelayError(sources, Integer.MAX_VALUE); }
/** * Merge the values in arbitrary 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> mergeDelayError(Iterable<? extends Solo<? extends T>> sources) { return mergeDelayError(sources, Integer.MAX_VALUE); }
/** * Merge the values in arbitrary 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> mergeDelayError(Publisher<? extends Solo<? extends T>> sources) { return mergeDelayError(sources, Integer.MAX_VALUE); }
/** * Merge the values in arbitrary 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> mergeDelayError(Publisher<? extends Solo<? extends T>> sources) { return mergeDelayError(sources, Integer.MAX_VALUE); }
@SuppressWarnings("unchecked") @Test public void mergeIterableDelayErrorError2() { Solo.mergeDelayError(Arrays.asList(Solo.error(new IOException()), Solo.just(2))) .test() .assertFailure(IOException.class, 2); }
@SuppressWarnings("unchecked") @Test public void mergeIterableDelayErrorError() { Solo.mergeDelayError(Arrays.asList(Solo.just(1), Solo.error(new IOException()))) .test() .assertFailure(IOException.class, 1); }
@SuppressWarnings("unchecked") @Test public void mergeIterableDelayError() { Solo.mergeDelayError(Arrays.asList(Solo.just(1), Solo.just(2))) .test() .assertResult(1, 2); }
@Test public void mergeDelayErrorPublisherError2() { Solo.mergeDelayError(Flowable.just(Solo.error(new IOException()), Solo.just(2))) .test() .assertFailure(IOException.class, 2); }
@Test public void mergeDelayErrorPublisherError() { Solo.mergeDelayError(Flowable.just(Solo.just(1), Solo.error(new IOException()))) .test() .assertFailure(IOException.class, 1); }
@Test public void mergeDelayErrorPublisherError3() { Solo.mergeDelayError( Flowable.just(Solo.just(1)) .concatWith(Flowable.<Solo<Integer>>error(new IOException())) ) .test() .assertFailure(IOException.class, 1); }
@Test public void mergeDelayErrorPublisher() { Solo.mergeDelayError(Flowable.just(Solo.just(1), Solo.just(2))) .test() .assertResult(1, 2); }
@Test public void mergeDelayErrorPublisherPrefetch() { Solo.mergeDelayError(Flowable.just(Solo.just(1), Solo.just(2)), 1) .test() .assertResult(1, 2); }