Closed
Description
Version: 3.0.12
I am not sure if this is per-design and specification (could not find this), but is it really expected that:
Flowable<Integer> integerFlowable = Flowable.just(1, 2, 3);
Flowable<Integer> delayedFlowable = Flowable.just(10).delay(1, TimeUnit.SECONDS);
integerFlowable.withLatestFrom(delayedFlowable, Integer::sum)
.test()
.assertValueCount(3)
.assertComplete();
fails with:
java.lang.AssertionError: Value counts differ; expected: 3 but was: 0 (latch = 0, values = 0, errors = 0, completions = 1)
Expected :3
Actual :0 (latch = 0, values = 0, errors = 0, completions = 1)
<Click to see difference>
If it is, then Javadoc needs to be improved, it is not stated anywhere that this will complete with no values of the other publisher is emitting item after a delay. Of course this is a simple example, but you get the point. If these would be two database calls and second comes emits after the first one, you get nothing? 😕