-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TCK: optional_spec105_emptyStreamMustTerminateBySignallingOnComplete requests 1 #350
Comments
Nowhere in the spec is such eagerness required. The test is designed to pass with both "eagerly completing" Publishers as well as "lazily completing once they notice they don't have anything to signal" Publishers. I don't see your point why this is wrong, it is valid and inclusive to many implementations. I'm sure you've seen plenty use cases for both behaviours. |
Okay. I'll check my assumption about the TCK tests if all of them accept such lazy completing source and get back to you. |
@akarnokd Shall we close this Issue? |
It's fine. There are a couple of operators, such as |
@akarnokd True. But assuming a test which only needs 2 elements, providing a source of only 2 elements and a takeWhile(_ => true), shouldn't that onComplete even after 2 elements? |
Depends on what the upstream of |
@akarnokd Yep, and since this is a Publisher test it seems tractable to provide a RangePublisher + takeWhile(_ => true) a sa Publisher? :) |
Do you mean adding an example |
@akarnokd No, I meant that it is possible to TCK-validate |
The test implementation requests 1 from a supposedly empty
Publisher
, but based on other tests and the likely interpretation of the spec (plus what @viktorklang expressed here), aPublisher
should emit anonComplete
oronError
without a call to request after any previousonNext
items were requested/consumed. For example, a length 3 finitePublisher
, when requesting3
should emit 3 items and complete without issuing any furtherrequest()
calls.The text was updated successfully, but these errors were encountered: