Skip to content

Commit 3217017

Browse files
committed
Merge pull request #3745 from akarnokd/Issue1685Fix
1.x: Fix the test Issue1685 not waiting long enough.
2 parents 2343989 + f7f5db4 commit 3217017

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/java/rx/ObservableTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,9 @@ public void uncaughtException(Thread t, Throwable e) {
11081108
subject.subscribe();
11091109
subject.materialize().toBlocking().first();
11101110

1111-
Thread.sleep(1000); // the uncaught exception comes after the terminal event reaches toBlocking
1111+
for (int i = 0; i < 20 && err.get() == null; i++) {
1112+
Thread.sleep(100); // the uncaught exception comes after the terminal event reaches toBlocking
1113+
}
11121114

11131115
assertNotNull("UncaughtExceptionHandler didn't get anything.", err.get());
11141116

0 commit comments

Comments
 (0)