use of io.reactivex.rxjava3.internal.operators.completable.CompletableTimeout.TimeOutObserver in project RxJava by ReactiveX.
the class CompletableTimeoutTest method ambRace.
@Test
public void ambRace() {
TestObserver<Void> to = new TestObserver<>();
to.onSubscribe(Disposable.empty());
CompositeDisposable cd = new CompositeDisposable();
AtomicBoolean once = new AtomicBoolean();
TimeOutObserver a = new TimeOutObserver(cd, once, to);
a.onComplete();
a.onComplete();
List<Throwable> errors = TestHelper.trackPluginErrors();
try {
a.onError(new TestException());
TestHelper.assertUndeliverable(errors, 0, TestException.class);
} finally {
RxJavaPlugins.reset();
}
}
Aggregations