-
Notifications
You must be signed in to change notification settings - Fork 534
TCK support for restricted length Producers and Consumers #87
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
Comments
Thanks for the feedback Rich, We'll try to figure something out, may be easy enough to integrate your request. |
Yes, my use case is single-element publishers and consumers made by wrapping Scala's futures and promises. I can also imagine zero-element versions of publishers and consumers (Publisher.empty, Consumer.empty) and versions of publishers and consumers that can only handle finite lengths (Publisher.fromArray, Consumer.toArray). |
So my current suggestion would be (as seen in PR #91): @Override
public long maxElementsFromPublisher() { return 1; } Which skips all tests which require more than 1 element to run (so currently, most of them: |
Looks like it was solved to me. Closing. |
I know the 0.3 TCK is out of date and a new TCK will be written at some point. Please consider this a feature request any new TCK.
The 0.3 TCK has support for verifying Producers and Consumers. I'll talk about Producer testing here, but the same idea applies to Consumer testing too.
Users of the ProducerVerificationTest need to implement
createPublisher(elements: Int)
and construct a Publisher of length elements (with an argument of 0 meaning a stream of infinite length).In my situation I wasn't able to satisfy the requirements of this method because the Producer I was creating only supported streams with exactly 1 element.
What I'd like to suggest is that, in any future TCK, there are options to specify the valid lengths of the stream that is being tested. For example, some streams might support only 0, 1 or finite lengths.
The text was updated successfully, but these errors were encountered: