@Override public Iterable<Integer> apply(Integer v) throws Exception { return new CrashingIterable(1, 100, 100); } })
@Override public Iterable<Integer> apply(Integer v) throws Exception { return new CrashingIterable(1, 100, 100); } })
@Override public Iterable<Integer> apply(Object v) throws Exception { return new CrashingIterable(100, 100, 1); } })
@Override public Iterable<Integer> apply(Integer v) throws Exception { return new CrashingIterable(100, 100, 1); } })
@Override public Iterable<Integer> apply(Object v) throws Exception { return new CrashingIterable(100, 2, 100); } })
@Override public Iterable<Integer> apply(Object v) throws Exception { return new CrashingIterable(100, 100, 1); } })
@Override public Iterable<Integer> apply(Integer v) throws Exception { return new CrashingIterable(1, 100, 100); } })
@Override public Iterable<Integer> apply(Integer v) throws Exception { return new CrashingIterable(100, 100, 1); } })
@Override public Iterable<Integer> apply(Integer v) throws Exception { return new CrashingIterable(100, 1, 100); } })
@Override public Iterable<Integer> apply(Integer v) throws Exception { return new CrashingIterable(100, 2, 100); } })
@Override public Iterable<Integer> apply(Object v) throws Exception { return new CrashingIterable(100, 100, 1); } })
@Override public Iterable<Integer> apply(Integer v) throws Exception { return new CrashingIterable(100, 1, 100); } })
@Override public Iterable<Integer> apply(Integer v) throws Exception { return new CrashingIterable(100, 2, 100); } })
@Override public Iterable<Integer> apply(Integer v) throws Exception { return new CrashingIterable(100, 1, 100); } })
@Override public Iterable<Integer> apply(Integer v) throws Exception { return new CrashingIterable(100, 100, 1); } })
@Override public Iterable<Integer> apply(Object v) throws Exception { return new CrashingIterable(100, 2, 100); } })
@Test public void hasNext2Throws() { Flowable.fromIterable(new CrashingIterable(100, 2, 100)) .test() .assertFailureAndMessage(TestException.class, "hasNext()", 0); }
@Test public void iteratorThrows() { Flowable.just(1).zipWith(new CrashingIterable(100, 1, 100), new BiFunction<Integer, Integer, Object>() { @Override public Object apply(Integer a, Integer b) throws Exception { return a + b; } }) .test() .assertFailureAndMessage(TestException.class, "hasNext()"); }
@Test public void normalConditionalCrash() { Flowable.fromIterable(new CrashingIterable(100, 2, 100)) .filter(Functions.alwaysTrue()) .test() .assertFailure(TestException.class, 0); }
@Test public void normalConditionalLong2() { Flowable.fromIterable(new CrashingIterable(100, 10 * 1000 * 1000, 10 * 1000 * 1000)) .filter(Functions.alwaysTrue()) .rebatchRequests(128) .take(1000 * 1000) .test() .assertSubscribed() .assertValueCount(1000 * 1000) .assertNoErrors() .assertComplete(); }