@Override public CompletableSource apply(Integer v) throws Exception { return Completable.error(new TestException()); } }, true, Integer.MAX_VALUE))
@Override public CompletableSource apply(Integer v) throws Exception { return Completable.error(new TestException()); } }, true, Integer.MAX_VALUE)
@Override public CompletableSource apply(Integer v) throws Exception { return Completable.error(new TestException()); } }, true).<Integer>toObservable()
@Override public CompletableSource apply(Integer v) throws Exception { return Completable.error(new TestException()); } }, true)
@Override public Completable apply(Integer v) throws Exception { return Completable.error(new TestException()); } })
@Override public CompletableSource apply(Integer v) throws Exception { return Completable.error(new TestException()); } }, true, Integer.MAX_VALUE)
@Override public Completable apply(Integer v) throws Exception { sleep(); return Completable.error(new TestException()); } })
@Override public Completable apply(Integer v) throws Exception { sleep(); return Completable.error(new TestException()); } })
@Test(timeout = 5000, expected = TestException.class) public void errorSupplierNormal() { Completable c = Completable.error(new Callable<Throwable>() { @Override public Throwable call() { return new TestException(); } }); c.blockingAwait(); }
@Override public Completable apply(Integer v) throws Exception { sleep(); return Completable.error(new TestException()); } })
@Test public void fromCompletableError() { Maybe.fromCompletable(Completable.error(new UnsupportedOperationException())) .test() .assertFailure(UnsupportedOperationException.class); }
@Test public void completableSubscribe0() { Completable.error(new TestException()) .subscribe(); }
@Test(timeout = 5000, expected = TestException.class) public void errorNormal() { Completable c = Completable.error(new TestException()); c.blockingAwait(); }
@Test public void blockingGetError() { TestException ex = new TestException(); assertSame(ex, Completable.error(ex).blockingGet()); }
@Test public void blockingGetErrorTimeout() { TestException ex = new TestException(); assertSame(ex, Completable.error(ex).blockingGet(1, TimeUnit.SECONDS)); }
@Test public void completableToMaybeError() { Completable.error(new TestException()) .toMaybe() .test() .assertFailure(TestException.class); }
@Test public void error() { Completable.error(new TestException()) .hide() .test() .assertFailure(TestException.class); }
@Test public void andThenMaybeError() { Completable.error(new RuntimeException("bla")) .andThen(Maybe.empty()) .test() .assertNotComplete() .assertNoValues() .assertError(RuntimeException.class) .assertErrorMessage("bla"); } }
@Test public void mainError() { Completable.error(new TestException()) .timeout(1, TimeUnit.DAYS) .test() .awaitDone(5, TimeUnit.SECONDS) .assertFailure(TestException.class); }
@Test public void otherErrors() { Completable.never() .timeout(1, TimeUnit.MILLISECONDS, Completable.error(new TestException())) .test() .awaitDone(5, TimeUnit.SECONDS) .assertFailure(TestException.class); }