Skip to content

Commit

Permalink
Merge pull request #3755 from akarnokd/FixtestErrorThrownIssue1685Again
Browse files Browse the repository at this point in the history
1.x: fix attempt 2 for testErrorThrownIssue1685
  • Loading branch information
akarnokd committed Mar 13, 2016
2 parents a539151 + a3ca1fd commit 662ce3b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/test/java/rx/ObservableTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 662ce3b

Please sign in to comment.