use of io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOnTest.DisposeTrackingScheduler in project RxJava by ReactiveX.
the class ObservableObserveOnTest method workerNotDisposedPrematurelyAsyncInNormalOut.
@Test
public void workerNotDisposedPrematurelyAsyncInNormalOut() {
DisposeTrackingScheduler s = new DisposeTrackingScheduler();
UnicastSubject<Integer> us = UnicastSubject.create();
us.onNext(1);
us.onComplete();
Observable.concat(us.observeOn(s), Observable.just(2)).test().assertResult(1, 2);
assertEquals(1, s.disposedCount.get());
}
use of io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOnTest.DisposeTrackingScheduler in project RxJava by ReactiveX.
the class ObservableObserveOnTest method workerNotDisposedPrematurelyNormalInAsyncOut.
@Test
public void workerNotDisposedPrematurelyNormalInAsyncOut() {
DisposeTrackingScheduler s = new DisposeTrackingScheduler();
TestObserverEx<Integer> to = new TestObserverFusedCanceling();
Observable.just(1).hide().observeOn(s).subscribe(to);
assertEquals(1, s.disposedCount.get());
}
use of io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOnTest.DisposeTrackingScheduler in project RxJava by ReactiveX.
the class ObservableObserveOnTest method workerNotDisposedPrematurelyNormalInNormalOut.
@Test
public void workerNotDisposedPrematurelyNormalInNormalOut() {
DisposeTrackingScheduler s = new DisposeTrackingScheduler();
Observable.concat(Observable.just(1).hide().observeOn(s), Observable.just(2)).test().assertResult(1, 2);
assertEquals(1, s.disposedCount.get());
}
use of io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOnTest.DisposeTrackingScheduler in project RxJava by ReactiveX.
the class ObservableObserveOnTest method workerNotDisposedPrematurelySyncInNormalOut.
@Test
public void workerNotDisposedPrematurelySyncInNormalOut() {
DisposeTrackingScheduler s = new DisposeTrackingScheduler();
Observable.concat(Observable.just(1).observeOn(s), Observable.just(2)).test().assertResult(1, 2);
assertEquals(1, s.disposedCount.get());
}
Aggregations