From 21a7a0567a51193734e21b234fa3ed925e65d0ec Mon Sep 17 00:00:00 2001 From: David Karnok Date: Mon, 20 Mar 2017 11:28:12 +0100 Subject: [PATCH] 2.x: increase timeout on parallel & completable tests (#5199) --- .../completable/CompletableTest.java | 378 +++++++++--------- .../parallel/ParallelFlowableTest.java | 3 +- 2 files changed, 191 insertions(+), 190 deletions(-) diff --git a/src/test/java/io/reactivex/completable/CompletableTest.java b/src/test/java/io/reactivex/completable/CompletableTest.java index 8c9327ea13..12f77135fb 100644 --- a/src/test/java/io/reactivex/completable/CompletableTest.java +++ b/src/test/java/io/reactivex/completable/CompletableTest.java @@ -151,7 +151,7 @@ public void assertSubscriptions(int n) { /** An error Completable object. */ final ErrorCompletable error = new ErrorCompletable(); - @Test(timeout = 1000) + @Test(timeout = 5000) public void complete() { Completable c = Completable.complete(); @@ -163,14 +163,14 @@ public void concatNull() { Completable.concatArray((Completable[])null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void concatEmpty() { Completable c = Completable.concatArray(); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void concatSingleSource() { Completable c = Completable.concatArray(normal.completable); @@ -179,14 +179,14 @@ public void concatSingleSource() { normal.assertSubscriptions(1); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void concatSingleSourceThrows() { Completable c = Completable.concatArray(error.completable); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void concatMultipleSources() { Completable c = Completable.concatArray(normal.completable, normal.completable, normal.completable); @@ -195,21 +195,21 @@ public void concatMultipleSources() { normal.assertSubscriptions(3); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void concatMultipleOneThrows() { Completable c = Completable.concatArray(normal.completable, error.completable, normal.completable); c.blockingAwait(); } - @Test(timeout = 1000, expected = NullPointerException.class) + @Test(timeout = 5000, expected = NullPointerException.class) public void concatMultipleOneIsNull() { Completable c = Completable.concatArray(normal.completable, null); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void concatIterableEmpty() { Completable c = Completable.concat(Collections.emptyList()); @@ -221,7 +221,7 @@ public void concatIterableNull() { Completable.concat((Iterable)null); } - @Test(timeout = 1000, expected = NullPointerException.class) + @Test(timeout = 5000, expected = NullPointerException.class) public void concatIterableIteratorNull() { Completable c = Completable.concat(new Iterable() { @Override @@ -233,14 +233,14 @@ public Iterator iterator() { c.blockingAwait(); } - @Test(timeout = 1000, expected = NullPointerException.class) + @Test(timeout = 5000, expected = NullPointerException.class) public void concatIterableWithNull() { Completable c = Completable.concat(Arrays.asList(normal.completable, (Completable)null)); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void concatIterableSingle() { Completable c = Completable.concat(Collections.singleton(normal.completable)); @@ -249,7 +249,7 @@ public void concatIterableSingle() { normal.assertSubscriptions(1); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void concatIterableMany() { Completable c = Completable.concat(Arrays.asList(normal.completable, normal.completable, normal.completable)); @@ -258,14 +258,14 @@ public void concatIterableMany() { normal.assertSubscriptions(3); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void concatIterableOneThrows() { Completable c = Completable.concat(Collections.singleton(error.completable)); c.blockingAwait(); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void concatIterableManyOneThrows() { Completable c = Completable.concat(Arrays.asList(normal.completable, error.completable)); @@ -298,14 +298,14 @@ public void concatIterableIteratorNextThrows() { c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void concatObservableEmpty() { Completable c = Completable.concat(Flowable.empty()); c.blockingAwait(); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void concatObservableError() { Completable c = Completable.concat(Flowable.error(new Callable() { @Override @@ -317,7 +317,7 @@ public Throwable call() { c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void concatObservableSingle() { Completable c = Completable.concat(Flowable.just(normal.completable)); @@ -326,14 +326,14 @@ public void concatObservableSingle() { normal.assertSubscriptions(1); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void concatObservableSingleThrows() { Completable c = Completable.concat(Flowable.just(error.completable)); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void concatObservableMany() { Completable c = Completable.concat(Flowable.just(normal.completable).repeat(3)); @@ -342,14 +342,14 @@ public void concatObservableMany() { normal.assertSubscriptions(3); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void concatObservableManyOneThrows() { Completable c = Completable.concat(Flowable.just(normal.completable, error.completable)); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void concatObservablePrefetch() { final List requested = new ArrayList(); Flowable cs = Flowable @@ -374,7 +374,7 @@ public void createNull() { Completable.unsafeCreate(null); } - @Test(timeout = 1000, expected = NullPointerException.class) + @Test(timeout = 5000, expected = NullPointerException.class) public void createOnSubscribeThrowsNPE() { Completable c = Completable.unsafeCreate(new CompletableSource() { @Override @@ -384,7 +384,7 @@ public void createOnSubscribeThrowsNPE() { c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void createOnSubscribeThrowsRuntimeException() { try { Completable c = Completable.unsafeCreate(new CompletableSource() { @@ -405,7 +405,7 @@ public void subscribe(CompletableObserver s) { } } - @Test(timeout = 1000) + @Test(timeout = 5000) public void defer() { Completable c = Completable.defer(new Callable() { @Override @@ -426,7 +426,7 @@ public void deferNull() { Completable.defer(null); } - @Test(timeout = 1000, expected = NullPointerException.class) + @Test(timeout = 5000, expected = NullPointerException.class) public void deferReturnsNull() { Completable c = Completable.defer(new Callable() { @Override @@ -438,7 +438,7 @@ public Completable call() { c.blockingAwait(); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void deferFunctionThrows() { Completable c = Completable.defer(new Callable() { @Override @@ -448,7 +448,7 @@ public void deferFunctionThrows() { c.blockingAwait(); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void deferErrorSource() { Completable c = Completable.defer(new Callable() { @Override @@ -465,7 +465,7 @@ public void errorSupplierNull() { Completable.error((Callable)null); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void errorSupplierNormal() { Completable c = Completable.error(new Callable() { @Override @@ -477,7 +477,7 @@ public Throwable call() { c.blockingAwait(); } - @Test(timeout = 1000, expected = NullPointerException.class) + @Test(timeout = 5000, expected = NullPointerException.class) public void errorSupplierReturnsNull() { Completable c = Completable.error(new Callable() { @Override @@ -489,7 +489,7 @@ public Throwable call() { c.blockingAwait(); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void errorSupplierThrows() { Completable c = Completable.error(new Callable() { @Override @@ -504,7 +504,7 @@ public void errorNull() { Completable.error((Throwable)null); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void errorNormal() { Completable c = Completable.error(new TestException()); @@ -516,7 +516,7 @@ public void fromCallableNull() { Completable.fromCallable(null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void fromCallableNormal() { final AtomicInteger calls = new AtomicInteger(); @@ -532,7 +532,7 @@ public Object call() throws Exception { Assert.assertEquals(1, calls.get()); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void fromCallableThrows() { Completable c = Completable.fromCallable(new Callable() { @Override @@ -547,7 +547,7 @@ public void fromFlowableNull() { Completable.fromPublisher(null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void fromFlowableEmpty() { Completable c = Completable.fromPublisher(Flowable.empty()); @@ -563,7 +563,7 @@ public void fromFlowableSome() { } } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void fromFlowableError() { Completable c = Completable.fromPublisher(Flowable.error(new Callable() { @Override @@ -580,7 +580,7 @@ public void fromObservableNull() { Completable.fromObservable(null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void fromObservableEmpty() { Completable c = Completable.fromObservable(Observable.empty()); @@ -596,7 +596,7 @@ public void fromObservableSome() { } } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void fromObservableError() { Completable c = Completable.fromObservable(Observable.error(new Callable() { @Override @@ -613,7 +613,7 @@ public void fromActionNull() { Completable.fromAction(null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void fromActionNormal() { final AtomicInteger calls = new AtomicInteger(); @@ -629,7 +629,7 @@ public void run() { Assert.assertEquals(1, calls.get()); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void fromActionThrows() { Completable c = Completable.fromAction(new Action() { @Override @@ -644,14 +644,14 @@ public void fromSingleNull() { Completable.fromSingle(null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void fromSingleNormal() { Completable c = Completable.fromSingle(Single.just(1)); c.blockingAwait(); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void fromSingleThrows() { Completable c = Completable.fromSingle(Single.error(new Callable() { @Override @@ -668,14 +668,14 @@ public void mergeNull() { Completable.mergeArray((Completable[])null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeEmpty() { Completable c = Completable.mergeArray(); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeSingleSource() { Completable c = Completable.mergeArray(normal.completable); @@ -684,14 +684,14 @@ public void mergeSingleSource() { normal.assertSubscriptions(1); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void mergeSingleSourceThrows() { Completable c = Completable.mergeArray(error.completable); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeMultipleSources() { Completable c = Completable.mergeArray(normal.completable, normal.completable, normal.completable); @@ -700,21 +700,21 @@ public void mergeMultipleSources() { normal.assertSubscriptions(3); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void mergeMultipleOneThrows() { Completable c = Completable.mergeArray(normal.completable, error.completable, normal.completable); c.blockingAwait(); } - @Test(timeout = 1000, expected = NullPointerException.class) + @Test(timeout = 5000, expected = NullPointerException.class) public void mergeMultipleOneIsNull() { Completable c = Completable.mergeArray(normal.completable, null); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeIterableEmpty() { Completable c = Completable.merge(Collections.emptyList()); @@ -726,7 +726,7 @@ public void mergeIterableNull() { Completable.merge((Iterable)null); } - @Test(timeout = 1000, expected = NullPointerException.class) + @Test(timeout = 5000, expected = NullPointerException.class) public void mergeIterableIteratorNull() { Completable c = Completable.merge(new Iterable() { @Override @@ -738,14 +738,14 @@ public Iterator iterator() { c.blockingAwait(); } - @Test(timeout = 1000, expected = NullPointerException.class) + @Test(timeout = 5000, expected = NullPointerException.class) public void mergeIterableWithNull() { Completable c = Completable.merge(Arrays.asList(normal.completable, (Completable)null)); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeIterableSingle() { Completable c = Completable.merge(Collections.singleton(normal.completable)); @@ -754,7 +754,7 @@ public void mergeIterableSingle() { normal.assertSubscriptions(1); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeIterableMany() { Completable c = Completable.merge(Arrays.asList(normal.completable, normal.completable, normal.completable)); @@ -763,14 +763,14 @@ public void mergeIterableMany() { normal.assertSubscriptions(3); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void mergeIterableOneThrows() { Completable c = Completable.merge(Collections.singleton(error.completable)); c.blockingAwait(); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void mergeIterableManyOneThrows() { Completable c = Completable.merge(Arrays.asList(normal.completable, error.completable)); @@ -803,14 +803,14 @@ public void mergeIterableIteratorNextThrows() { c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeObservableEmpty() { Completable c = Completable.merge(Flowable.empty()); c.blockingAwait(); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void mergeObservableError() { Completable c = Completable.merge(Flowable.error(new Callable() { @Override @@ -822,7 +822,7 @@ public Throwable call() { c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeObservableSingle() { Completable c = Completable.merge(Flowable.just(normal.completable)); @@ -831,14 +831,14 @@ public void mergeObservableSingle() { normal.assertSubscriptions(1); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void mergeObservableSingleThrows() { Completable c = Completable.merge(Flowable.just(error.completable)); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeObservableMany() { Completable c = Completable.merge(Flowable.just(normal.completable).repeat(3)); @@ -847,14 +847,14 @@ public void mergeObservableMany() { normal.assertSubscriptions(3); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void mergeObservableManyOneThrows() { Completable c = Completable.merge(Flowable.just(normal.completable, error.completable)); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeObservableMaxConcurrent() { final List requested = new ArrayList(); Flowable cs = Flowable @@ -880,14 +880,14 @@ public void mergeDelayErrorNull() { Completable.mergeArrayDelayError((Completable[])null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeDelayErrorEmpty() { Completable c = Completable.mergeArrayDelayError(); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeDelayErrorSingleSource() { Completable c = Completable.mergeArrayDelayError(normal.completable); @@ -896,14 +896,14 @@ public void mergeDelayErrorSingleSource() { normal.assertSubscriptions(1); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void mergeDelayErrorSingleSourceThrows() { Completable c = Completable.mergeArrayDelayError(error.completable); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeDelayErrorMultipleSources() { Completable c = Completable.mergeArrayDelayError(normal.completable, normal.completable, normal.completable); @@ -912,7 +912,7 @@ public void mergeDelayErrorMultipleSources() { normal.assertSubscriptions(3); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeDelayErrorMultipleOneThrows() { Completable c = Completable.mergeArrayDelayError(normal.completable, error.completable, normal.completable); @@ -923,14 +923,14 @@ public void mergeDelayErrorMultipleOneThrows() { } } - @Test(timeout = 1000, expected = NullPointerException.class) + @Test(timeout = 5000, expected = NullPointerException.class) public void mergeDelayErrorMultipleOneIsNull() { Completable c = Completable.mergeArrayDelayError(normal.completable, null); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeDelayErrorIterableEmpty() { Completable c = Completable.mergeDelayError(Collections.emptyList()); @@ -942,7 +942,7 @@ public void mergeDelayErrorIterableNull() { Completable.mergeDelayError((Iterable)null); } - @Test(timeout = 1000, expected = NullPointerException.class) + @Test(timeout = 5000, expected = NullPointerException.class) public void mergeDelayErrorIterableIteratorNull() { Completable c = Completable.mergeDelayError(new Iterable() { @Override @@ -954,14 +954,14 @@ public Iterator iterator() { c.blockingAwait(); } - @Test(timeout = 1000, expected = NullPointerException.class) + @Test(timeout = 5000, expected = NullPointerException.class) public void mergeDelayErrorIterableWithNull() { Completable c = Completable.mergeDelayError(Arrays.asList(normal.completable, (Completable)null)); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeDelayErrorIterableSingle() { Completable c = Completable.mergeDelayError(Collections.singleton(normal.completable)); @@ -970,7 +970,7 @@ public void mergeDelayErrorIterableSingle() { normal.assertSubscriptions(1); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeDelayErrorIterableMany() { Completable c = Completable.mergeDelayError(Arrays.asList(normal.completable, normal.completable, normal.completable)); @@ -979,14 +979,14 @@ public void mergeDelayErrorIterableMany() { normal.assertSubscriptions(3); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void mergeDelayErrorIterableOneThrows() { Completable c = Completable.mergeDelayError(Collections.singleton(error.completable)); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeDelayErrorIterableManyOneThrows() { Completable c = Completable.mergeDelayError(Arrays.asList(normal.completable, error.completable, normal.completable)); @@ -1023,14 +1023,14 @@ public void mergeDelayErrorIterableIteratorNextThrows() { c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeDelayErrorObservableEmpty() { Completable c = Completable.mergeDelayError(Flowable.empty()); c.blockingAwait(); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void mergeDelayErrorObservableError() { Completable c = Completable.mergeDelayError(Flowable.error(new Callable() { @Override @@ -1042,7 +1042,7 @@ public Throwable call() { c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeDelayErrorObservableSingle() { Completable c = Completable.mergeDelayError(Flowable.just(normal.completable)); @@ -1051,14 +1051,14 @@ public void mergeDelayErrorObservableSingle() { normal.assertSubscriptions(1); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void mergeDelayErrorObservableSingleThrows() { Completable c = Completable.mergeDelayError(Flowable.just(error.completable)); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeDelayErrorObservableMany() { Completable c = Completable.mergeDelayError(Flowable.just(normal.completable).repeat(3)); @@ -1067,14 +1067,14 @@ public void mergeDelayErrorObservableMany() { normal.assertSubscriptions(3); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void mergeDelayErrorObservableManyOneThrows() { Completable c = Completable.mergeDelayError(Flowable.just(normal.completable, error.completable)); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeDelayErrorObservableMaxConcurrent() { final List requested = new ArrayList(); Flowable cs = Flowable @@ -1095,7 +1095,7 @@ public void accept(long v) { Assert.assertEquals(Arrays.asList(5L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), requested); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void never() { final AtomicBoolean onSubscribeCalled = new AtomicBoolean(); final AtomicInteger calls = new AtomicInteger(); @@ -1134,7 +1134,7 @@ public void timerNewThread() { c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void timerTestScheduler() { TestScheduler scheduler = new TestScheduler(); @@ -1211,7 +1211,7 @@ public void timerSchedulerNull() { Completable.timer(1, TimeUnit.SECONDS, null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void usingNormalEager() { final AtomicInteger dispose = new AtomicInteger(); @@ -1257,7 +1257,7 @@ public void onComplete() { Assert.assertNull(error.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void usingNormalLazy() { final AtomicInteger dispose = new AtomicInteger(); @@ -1303,7 +1303,7 @@ public void onComplete() { Assert.assertNull(error.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void usingErrorEager() { final AtomicInteger dispose = new AtomicInteger(); @@ -1349,7 +1349,7 @@ public void onComplete() { Assert.assertFalse(complete.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void usingErrorLazy() { final AtomicInteger dispose = new AtomicInteger(); @@ -1515,7 +1515,7 @@ public Completable apply(Object v) { c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void composeNormal() { Completable c = error.completable.compose(new CompletableTransformer() { @Override @@ -1532,7 +1532,7 @@ public void composeNull() { error.completable.compose(null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void concatWithNormal() { Completable c = normal.completable.concatWith(normal.completable); @@ -1541,7 +1541,7 @@ public void concatWithNormal() { normal.assertSubscriptions(2); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void concatWithError() { Completable c = normal.completable.concatWith(error.completable); @@ -1563,7 +1563,7 @@ public void delaySchedulerNull() { normal.completable.delay(1, TimeUnit.SECONDS, null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void delayNormal() throws InterruptedException { Completable c = normal.completable.delay(250, TimeUnit.MILLISECONDS); @@ -1602,7 +1602,7 @@ public void onComplete() { Assert.assertNull(error.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void delayErrorImmediately() throws InterruptedException { final TestScheduler scheduler = new TestScheduler(); final Completable c = error.completable.delay(250, TimeUnit.MILLISECONDS, scheduler); @@ -1637,7 +1637,7 @@ public void onComplete() { Assert.assertFalse("Already done", done.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void delayErrorToo() throws InterruptedException { Completable c = error.completable.delay(250, TimeUnit.MILLISECONDS, Schedulers.computation(), true); @@ -1672,7 +1672,7 @@ public void onComplete() { Assert.assertTrue(error.get() instanceof TestException); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void doOnCompleteNormal() { final AtomicInteger calls = new AtomicInteger(); @@ -1688,7 +1688,7 @@ public void run() { Assert.assertEquals(1, calls.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void doOnCompleteError() { final AtomicInteger calls = new AtomicInteger(); @@ -1714,7 +1714,7 @@ public void doOnCompleteNull() { normal.completable.doOnComplete(null); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void doOnCompleteThrows() { Completable c = normal.completable.doOnComplete(new Action() { @Override @@ -1724,7 +1724,7 @@ public void doOnCompleteThrows() { c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void doOnDisposeNormalDoesntCall() { final AtomicInteger calls = new AtomicInteger(); @@ -1740,7 +1740,7 @@ public void run() { Assert.assertEquals(0, calls.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void doOnDisposeErrorDoesntCall() { final AtomicInteger calls = new AtomicInteger(); @@ -1760,7 +1760,7 @@ public void run() { Assert.assertEquals(0, calls.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void doOnDisposeChildCancels() { final AtomicInteger calls = new AtomicInteger(); @@ -1796,7 +1796,7 @@ public void doOnDisposeNull() { normal.completable.doOnDispose(null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void doOnDisposeThrows() { Completable c = normal.completable.doOnDispose(new Action() { @Override @@ -1821,7 +1821,7 @@ public void onComplete() { }); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void doOnErrorNoError() { final AtomicReference error = new AtomicReference(); @@ -1837,7 +1837,7 @@ public void accept(Throwable e) { Assert.assertNull(error.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void doOnErrorHasError() { final AtomicReference err = new AtomicReference(); @@ -1863,7 +1863,7 @@ public void doOnErrorNull() { normal.completable.doOnError(null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void doOnErrorThrows() { Completable c = error.completable.doOnError(new Consumer() { @Override @@ -1880,7 +1880,7 @@ public void doOnErrorThrows() { } } - @Test(timeout = 1000) + @Test(timeout = 5000) public void doOnSubscribeNormal() { final AtomicInteger calls = new AtomicInteger(); @@ -1913,7 +1913,7 @@ public void doOnSubscribeThrows() { c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void doOnTerminateNormal() { final AtomicInteger calls = new AtomicInteger(); @@ -1929,7 +1929,7 @@ public void run() { Assert.assertEquals(1, calls.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void doOnTerminateError() { final AtomicInteger calls = new AtomicInteger(); @@ -1950,17 +1950,17 @@ public void run() { Assert.assertEquals(1, calls.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void getNormal() { Assert.assertNull(normal.completable.blockingGet()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void getError() { Assert.assertTrue(error.completable.blockingGet() instanceof TestException); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void getTimeout() { try { Completable.never().blockingGet(100, TimeUnit.MILLISECONDS); @@ -1981,7 +1981,7 @@ public void liftNull() { normal.completable.lift(null); } - @Test(timeout = 1000, expected = NullPointerException.class) + @Test(timeout = 5000, expected = NullPointerException.class) public void liftReturnsNull() { Completable c = normal.completable.lift(new CompletableOperator() { @Override @@ -2016,14 +2016,14 @@ public void onSubscribe(Disposable d) { }; } } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void liftOnCompleteError() { Completable c = normal.completable.lift(new CompletableOperatorSwap()); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void liftOnErrorComplete() { Completable c = error.completable.lift(new CompletableOperatorSwap()); @@ -2035,7 +2035,7 @@ public void mergeWithNull() { normal.completable.mergeWith(null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void mergeWithNormal() { Completable c = normal.completable.mergeWith(normal.completable); @@ -2049,7 +2049,7 @@ public void observeOnNull() { normal.completable.observeOn(null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void observeOnNormal() throws InterruptedException { final AtomicReference name = new AtomicReference(); final AtomicReference err = new AtomicReference(); @@ -2082,7 +2082,7 @@ public void onError(Throwable e) { Assert.assertTrue(name.get().startsWith("RxComputation")); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void observeOnError() throws InterruptedException { final AtomicReference name = new AtomicReference(); final AtomicReference err = new AtomicReference(); @@ -2116,14 +2116,14 @@ public void onError(Throwable e) { Assert.assertTrue(name.get().startsWith("RxComputation")); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void onErrorComplete() { Completable c = error.completable.onErrorComplete(); c.blockingAwait(); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void onErrorCompleteFalse() { Completable c = error.completable.onErrorComplete(new Predicate() { @Override @@ -2145,7 +2145,7 @@ public void onErrorResumeNextNull() { error.completable.onErrorResumeNext(null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void onErrorResumeNextFunctionReturnsNull() { Completable c = error.completable.onErrorResumeNext(new Function() { @Override @@ -2162,7 +2162,7 @@ public Completable apply(Throwable e) { } } - @Test(timeout = 1000) + @Test(timeout = 5000) public void onErrorResumeNextFunctionThrows() { Completable c = error.completable.onErrorResumeNext(new Function() { @Override @@ -2181,7 +2181,7 @@ public void onErrorResumeNextFunctionThrows() { } } - @Test(timeout = 1000) + @Test(timeout = 5000) public void onErrorResumeNextNormal() { Completable c = error.completable.onErrorResumeNext(new Function() { @Override @@ -2193,7 +2193,7 @@ public Completable apply(Throwable v) { c.blockingAwait(); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void onErrorResumeNextError() { Completable c = error.completable.onErrorResumeNext(new Function() { @Override @@ -2245,14 +2245,14 @@ public void onComplete() { Assert.assertNull(err.get()); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void repeatError() { Completable c = error.completable.repeat(); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void repeat5Times() { final AtomicInteger calls = new AtomicInteger(); @@ -2269,7 +2269,7 @@ public Object call() throws Exception { Assert.assertEquals(5, calls.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void repeat1Time() { final AtomicInteger calls = new AtomicInteger(); @@ -2286,7 +2286,7 @@ public Object call() throws Exception { Assert.assertEquals(1, calls.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void repeat0Time() { final AtomicInteger calls = new AtomicInteger(); @@ -2303,7 +2303,7 @@ public Object call() throws Exception { Assert.assertEquals(0, calls.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void repeatUntilNormal() { final AtomicInteger calls = new AtomicInteger(); final AtomicInteger times = new AtomicInteger(5); @@ -2336,7 +2336,7 @@ public void repeatWhenNull() { normal.completable.repeatWhen(null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void retryNormal() { Completable c = normal.completable.retry(); @@ -2345,7 +2345,7 @@ public void retryNormal() { normal.assertSubscriptions(1); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void retry5Times() { final AtomicInteger calls = new AtomicInteger(5); Completable c = Completable.fromAction(new Action() { @@ -2360,7 +2360,7 @@ public void run() { c.blockingAwait(); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void retryBiPredicate5Times() { Completable c = error.completable.retry(new BiPredicate() { @Override @@ -2372,14 +2372,14 @@ public boolean test(Integer n, Throwable e) { c.blockingAwait(); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void retryTimes5Error() { Completable c = error.completable.retry(5); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void retryTimes5Normal() { final AtomicInteger calls = new AtomicInteger(5); @@ -2400,7 +2400,7 @@ public void retryNegativeTimes() { normal.completable.retry(-1); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void retryPredicateError() { Completable c = error.completable.retry(new Predicate() { @Override @@ -2417,7 +2417,7 @@ public void retryPredicateNull() { error.completable.retry((Predicate)null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void retryPredicate5Times() { final AtomicInteger calls = new AtomicInteger(5); @@ -2438,7 +2438,7 @@ public boolean test(Throwable e) { c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void retryWhen5Times() { final AtomicInteger calls = new AtomicInteger(5); @@ -2460,7 +2460,7 @@ public Publisher apply(Flowable o) { c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void subscribe() throws InterruptedException { final AtomicBoolean complete = new AtomicBoolean(); @@ -2484,7 +2484,7 @@ public void run() { assertTrue(d.isDisposed()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void subscribeDispose() throws InterruptedException { final AtomicBoolean complete = new AtomicBoolean(); @@ -2508,7 +2508,7 @@ public void run() { Assert.assertFalse("Completed", complete.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void subscribeTwoCallbacksNormal() { final AtomicReference err = new AtomicReference(); final AtomicBoolean complete = new AtomicBoolean(); @@ -2528,7 +2528,7 @@ public void accept(Throwable e) { Assert.assertTrue("Not completed", complete.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void subscribeTwoCallbacksError() { final AtomicReference err = new AtomicReference(); final AtomicBoolean complete = new AtomicBoolean(); @@ -2564,7 +2564,7 @@ public void run() { } }, null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void subscribeTwoCallbacksCompleteThrows() { final AtomicReference err = new AtomicReference(); normal.completable.subscribe(new Action() { @@ -2580,7 +2580,7 @@ public void accept(Throwable e) { Assert.assertTrue(String.valueOf(err.get()), err.get() instanceof TestException); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void subscribeTwoCallbacksOnErrorThrows() { error.completable.subscribe(new Action() { @Override @@ -2591,7 +2591,7 @@ public void run() { } }); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void subscribeObserverNormal() { TestObserver ts = new TestObserver(); @@ -2602,7 +2602,7 @@ public void subscribeObserverNormal() { ts.assertNoErrors(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void subscribeObserverError() { TestObserver ts = new TestObserver(); @@ -2613,7 +2613,7 @@ public void subscribeObserverError() { ts.assertError(TestException.class); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void subscribeActionNormal() { final AtomicBoolean run = new AtomicBoolean(); @@ -2627,7 +2627,7 @@ public void run() { Assert.assertTrue("Not completed", run.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void subscribeActionError() { final AtomicBoolean run = new AtomicBoolean(); @@ -2661,7 +2661,7 @@ public void subscribeCompletableSubscriberNull() { normal.completable.subscribe((CompletableObserver)null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void subscribeSubscriberNormal() { TestSubscriber ts = new TestSubscriber(); @@ -2672,7 +2672,7 @@ public void subscribeSubscriberNormal() { ts.assertNoErrors(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void subscribeSubscriberError() { TestSubscriber ts = new TestSubscriber(); @@ -2688,7 +2688,7 @@ public void subscribeOnNull() { normal.completable.subscribeOn(null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void subscribeOnNormal() { final AtomicReference name = new AtomicReference(); @@ -2705,7 +2705,7 @@ public void subscribe(CompletableObserver s) { Assert.assertTrue(name.get().startsWith("RxComputation")); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void subscribeOnError() { final AtomicReference name = new AtomicReference(); @@ -2727,14 +2727,14 @@ public void subscribe(CompletableObserver s) { Assert.assertTrue(name.get().startsWith("RxComputation")); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void timeoutEmitError() { Throwable e = Completable.never().timeout(100, TimeUnit.MILLISECONDS).blockingGet(); Assert.assertTrue(e instanceof TimeoutException); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void timeoutSwitchNormal() { Completable c = Completable.never().timeout(100, TimeUnit.MILLISECONDS, normal.completable); @@ -2743,7 +2743,7 @@ public void timeoutSwitchNormal() { normal.assertSubscriptions(1); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void timeoutTimerCancelled() throws InterruptedException { Completable c = Completable.fromCallable(new Callable() { @Override @@ -2775,7 +2775,7 @@ public void timeoutOtherNull() { normal.completable.timeout(1, TimeUnit.SECONDS, (Completable)null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void toNormal() { Flowable flow = normal.completable.to(new Function>() { @Override @@ -2795,27 +2795,27 @@ public void toNull() { normal.completable.to(null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void toFlowableNormal() { normal.completable.toFlowable().blockingForEach(Functions.emptyConsumer()); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void toFlowableError() { error.completable.toFlowable().blockingForEach(Functions.emptyConsumer()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void toObservableNormal() { normal.completable.toObservable().blockingForEach(Functions.emptyConsumer()); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void toObservableError() { error.completable.toObservable().blockingForEach(Functions.emptyConsumer()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void toSingleSupplierNormal() { Assert.assertEquals(1, normal.completable.toSingle(new Callable() { @Override @@ -2825,7 +2825,7 @@ public Object call() { }).blockingGet()); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void toSingleSupplierError() { error.completable.toSingle(new Callable() { @Override @@ -2858,12 +2858,12 @@ public void toSingleSupplierThrows() { }).blockingGet(); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void toSingleDefaultError() { error.completable.toSingleDefault(1).blockingGet(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void toSingleDefaultNormal() { Assert.assertEquals((Integer)1, normal.completable.toSingleDefault(1).blockingGet()); } @@ -2873,7 +2873,7 @@ public void toSingleDefaultNull() { normal.completable.toSingleDefault(null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void unsubscribeOnNormal() throws InterruptedException { final AtomicReference name = new AtomicReference(); final CountDownLatch cdl = new CountDownLatch(1); @@ -2919,28 +2919,28 @@ public void ambArrayNull() { Completable.ambArray((Completable[])null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambArrayEmpty() { Completable c = Completable.ambArray(); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambArraySingleNormal() { Completable c = Completable.ambArray(normal.completable); c.blockingAwait(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambArraySingleError() { Completable.ambArray(error.completable) .test() .assertError(TestException.class); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambArrayOneFires() { PublishProcessor ps1 = PublishProcessor.create(); PublishProcessor ps2 = PublishProcessor.create(); @@ -2971,7 +2971,7 @@ public void run() { Assert.assertTrue("Not completed", complete.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambArrayOneFiresError() { PublishProcessor ps1 = PublishProcessor.create(); PublishProcessor ps2 = PublishProcessor.create(); @@ -3002,7 +3002,7 @@ public void accept(Throwable v) { Assert.assertTrue("Not completed", complete.get() instanceof TestException); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambArraySecondFires() { PublishProcessor ps1 = PublishProcessor.create(); PublishProcessor ps2 = PublishProcessor.create(); @@ -3033,7 +3033,7 @@ public void run() { Assert.assertTrue("Not completed", complete.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambArraySecondFiresError() { PublishProcessor ps1 = PublishProcessor.create(); PublishProcessor ps2 = PublishProcessor.create(); @@ -3064,14 +3064,14 @@ public void accept(Throwable v) { Assert.assertTrue("Not completed", complete.get() instanceof TestException); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambMultipleOneIsNull() { Completable.ambArray(null, normal.completable) .test() .assertError(NullPointerException.class); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambIterableEmpty() { Completable c = Completable.amb(Collections.emptyList()); @@ -3083,7 +3083,7 @@ public void ambIterableNull() { Completable.amb((Iterable)null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambIterableIteratorNull() { Completable.amb(new Iterable() { @Override @@ -3093,14 +3093,14 @@ public Iterator iterator() { }).test().assertError(NullPointerException.class); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambIterableWithNull() { Completable.amb(Arrays.asList(null, normal.completable)) .test() .assertError(NullPointerException.class); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambIterableSingle() { Completable c = Completable.amb(Collections.singleton(normal.completable)); @@ -3109,7 +3109,7 @@ public void ambIterableSingle() { normal.assertSubscriptions(1); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambIterableMany() { Completable c = Completable.amb(Arrays.asList(normal.completable, normal.completable, normal.completable)); @@ -3118,14 +3118,14 @@ public void ambIterableMany() { normal.assertSubscriptions(1); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambIterableOneThrows() { Completable.amb(Collections.singleton(error.completable)) .test() .assertError(TestException.class); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambIterableManyOneThrows() { Completable.amb(Arrays.asList(error.completable, normal.completable)) .test() @@ -3161,7 +3161,7 @@ public void ambWithNull() { normal.completable.ambWith(null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambWithArrayOneFires() { PublishProcessor ps1 = PublishProcessor.create(); PublishProcessor ps2 = PublishProcessor.create(); @@ -3192,7 +3192,7 @@ public void run() { Assert.assertTrue("Not completed", complete.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambWithArrayOneFiresError() { PublishProcessor ps1 = PublishProcessor.create(); PublishProcessor ps2 = PublishProcessor.create(); @@ -3223,7 +3223,7 @@ public void accept(Throwable v) { Assert.assertTrue("Not completed", complete.get() instanceof TestException); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambWithArraySecondFires() { PublishProcessor ps1 = PublishProcessor.create(); PublishProcessor ps2 = PublishProcessor.create(); @@ -3254,7 +3254,7 @@ public void run() { Assert.assertTrue("Not completed", complete.get()); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void ambWithArraySecondFiresError() { PublishProcessor ps1 = PublishProcessor.create(); PublishProcessor ps2 = PublishProcessor.create(); @@ -3285,7 +3285,7 @@ public void accept(Throwable v) { Assert.assertTrue("Not completed", complete.get() instanceof TestException); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void startWithCompletableNormal() { final AtomicBoolean run = new AtomicBoolean(); Completable c = normal.completable @@ -3303,7 +3303,7 @@ public Object call() throws Exception { normal.assertSubscriptions(1); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void startWithCompletableError() { Completable c = normal.completable.startWith(error.completable); @@ -3316,7 +3316,7 @@ public void startWithCompletableError() { } } - @Test(timeout = 1000) + @Test(timeout = 5000) public void startWithFlowableNormal() { final AtomicBoolean run = new AtomicBoolean(); Flowable c = normal.completable @@ -3340,7 +3340,7 @@ public Object call() throws Exception { ts.assertNoErrors(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void startWithFlowableError() { Flowable c = normal.completable .startWith(Flowable.error(new TestException())); @@ -3356,7 +3356,7 @@ public void startWithFlowableError() { ts.assertNotComplete(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void startWithObservableNormal() { final AtomicBoolean run = new AtomicBoolean(); Observable c = normal.completable @@ -3380,7 +3380,7 @@ public Object call() throws Exception { ts.assertNoErrors(); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void startWithObservableError() { Observable c = normal.completable .startWith(Observable.error(new TestException())); @@ -4472,7 +4472,7 @@ public void fromRunnableNull() { Completable.fromRunnable(null); } - @Test(timeout = 1000) + @Test(timeout = 5000) public void fromRunnableNormal() { final AtomicInteger calls = new AtomicInteger(); @@ -4488,7 +4488,7 @@ public void run() { Assert.assertEquals(1, calls.get()); } - @Test(timeout = 1000, expected = TestException.class) + @Test(timeout = 5000, expected = TestException.class) public void fromRunnableThrows() { Completable c = Completable.fromRunnable(new Runnable() { @Override @@ -4566,7 +4566,7 @@ public void accept(final Throwable throwable) throws Exception { } - @Test(timeout = 1000) + @Test(timeout = 5000) public void subscribeTwoCallbacksDispose() { PublishProcessor pp = PublishProcessor.create(); Disposable d = pp.ignoreElements().subscribe(Functions.EMPTY_ACTION, Functions.emptyConsumer()); diff --git a/src/test/java/io/reactivex/parallel/ParallelFlowableTest.java b/src/test/java/io/reactivex/parallel/ParallelFlowableTest.java index dcf3e81e69..4cda73adbc 100644 --- a/src/test/java/io/reactivex/parallel/ParallelFlowableTest.java +++ b/src/test/java/io/reactivex/parallel/ParallelFlowableTest.java @@ -744,7 +744,8 @@ public void parallelismAndPrefetchAsync() { .map(Functions.identity()) .sequential(prefetch) .test() - .awaitDone(10, TimeUnit.SECONDS) + .withTag("parallelism = " + parallelism + ", prefetch = " + prefetch) + .awaitDone(30, TimeUnit.SECONDS) .assertSubscribed() .assertValueCount(1024 * 1024) .assertNoErrors()