Skip to content

Commit 76c80a8

Browse files
Revert Behavior Change in TestSubscriber.awaitTerminalEvent
Reverts change made at https://github.com/ReactiveX/RxJava/pull/2332/files#diff-fbed6a16f49022fd2b10f45fd6dd015bR230 See discussion at #2549 (comment) The Javadoc for this method clearly states that it will wait until completion or timeout. It does not say it will throw an exception on timeout, so we can not start throwing as that is a behavioral change.
1 parent 005f1bb commit 76c80a8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/rx/observers/TestSubscriber.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,7 @@ public void awaitTerminalEvent() {
226226
*/
227227
public void awaitTerminalEvent(long timeout, TimeUnit unit) {
228228
try {
229-
if (!latch.await(timeout, unit)) {
230-
throw new RuntimeException(new TimeoutException());
231-
}
229+
latch.await(timeout, unit);
232230
} catch (InterruptedException e) {
233231
throw new RuntimeException("Interrupted", e);
234232
}

0 commit comments

Comments
 (0)