Closed
Description
This test case is failing (tested with 1.1.2):
@Test
public void testWithSubjects() {
PublishSubject<Integer> delayUntil = PublishSubject.create();
PublishSubject<Integer> interrupt = PublishSubject.create();
final AtomicBoolean subscribed = new AtomicBoolean(false);
Observable.just(1)
.doOnSubscribe(() -> subscribed.set(true))
.delaySubscription(delayUntil)
.takeUntil(interrupt)
.subscribe();
interrupt.onNext(9000);
delayUntil.onNext(1);
assertFalse(subscribed.get());
}
I stumbled upon this using Completable.andThen
(which delegates to delaySubscription
).