From a3ca1fd37d79ff9417c756ccf2537be025dfc1a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Karnok?= Date: Mon, 14 Mar 2016 00:43:33 +0100 Subject: [PATCH] 1.x: fix attempt 2 for testErrorThrownIssue1685 --- src/test/java/rx/ObservableTests.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/java/rx/ObservableTests.java b/src/test/java/rx/ObservableTests.java index 4b0d2f2330..e0c12b2d37 100644 --- a/src/test/java/rx/ObservableTests.java +++ b/src/test/java/rx/ObservableTests.java @@ -1099,16 +1099,17 @@ public void uncaughtException(Thread t, Throwable e) { } }).get(); + subject.subscribe(); + Observable.error(new RuntimeException("oops")) .materialize() .delay(1, TimeUnit.SECONDS, s) .dematerialize() .subscribe(subject); - subject.subscribe(); subject.materialize().toBlocking().first(); - for (int i = 0; i < 20 && err.get() == null; i++) { + for (int i = 0; i < 50 && err.get() == null; i++) { Thread.sleep(100); // the uncaught exception comes after the terminal event reaches toBlocking }