use of io.reactivex.rxjava3.processors.ReplayProcessor in project RxJava by ReactiveX.
the class ReplayProcessorTest method noHeadRetentionErrorTime.
@Test
public void noHeadRetentionErrorTime() {
ReplayProcessor<Integer> source = ReplayProcessor.createWithTime(1, TimeUnit.MINUTES, Schedulers.computation());
source.onNext(1);
source.onNext(2);
source.onError(new TestException());
SizeAndTimeBoundReplayBuffer<Integer> buf = (SizeAndTimeBoundReplayBuffer<Integer>) source.buffer;
assertNull(buf.head.value);
Object o = buf.head;
source.cleanupBuffer();
assertSame(o, buf.head);
}
Aggregations