Closed danielkec closed 4 years ago
rs.of
will create a sigleton with rs.<Integer>fromPublisher(subscriber::complete)
so both the upstream of flatMap
and the only inner source will signal onComplete
, thus the downstream subscriber can complete without any items immediately. I think the subscriber.request(1)
is there because some implementations of flatMap
may not start consuming rs.of
until there is at least some demand from the downstream.
@danielkec does the response from @akarnokd answer your question? Is this still an issue? If not, can you close this?
I get it now, thx
Hi, I am not sure if understood it correctly but it seems that
required_spec209_mustBePreparedToReceiveAnOnCompleteSignalWithoutPrecedingRequestCall
is being tested on the FlatMap inner subscriber by expecting onComplete being sent to downstream when onComplete of the inner subscriber is invoked.Seams to me weird a little, I would expect that every inner publisher in flatMap operator calls onComplete when it finishes, but that onComplete is not propagated downstream until upstream finishes/sends onComplete.
Also subscriber for
FlatMapStageVerification.InnerSubscriberVerification
is prepared like this:Which seems to make
required_spec209_mustBePreparedToReceiveAnOnCompleteSignalWithoutPrecedingRequestCall
test even less applicable, there shouldn't be any preceding request.Not sure how to address this and would appreciate any help.