-
Notifications
You must be signed in to change notification settings - Fork 534
Removes the use of annotations, switches to test prefix naming #189
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
The head ref may contain hidden characters: "wip-fix-identityprocessorverification-\u221A"
Conversation
Trying |
Mhhh looks like it still tries the test, should I override myself in the end-test with @Additional too ? |
Shouldn't have to, but try. Cheers,
|
Ahaha can't its package scope :) Note to be sure I have incremented the version to RC2.BUILD-SNAPSHOT. This works @Override
@org.testng.annotations.Test
public void spec212_mustNotCallOnSubscribeMoreThanOnceBasedOnObjectEquality_specViolation() throws Throwable {
} |
I can also implement some logic to switch to an hot stream in this override but I suppose the goal is to have the TCK itself flexible on that rule. |
ac90001
to
54898e9
Compare
Does this work? @Override
@org.testng.annotations.Test
@Additional
public void spec212_mustNotCallOnSubscribeMoreThanOnceBasedOnObjectEquality_specViolation() throws Throwable {
super.spec212_mustNotCallOnSubscribeMoreThanOnceBasedOnObjectEquality_specViolation();
} |
I just pushed a new commit where I introduce interfaces to keep track that the right methods are reflected in both the Publisher, Subscriber and Processor verifications. |
Can you try this branch? |
54898e9
to
7aadee3
Compare
@Additional is package scoped like other TCK annotations. Going to try the latest commit in a min. |
…erifications to the IdentityProcessor-verification so that they are applied for the delegation. Introduces SubscriberWhiteboxVerificationRules, SubscriberBlackboxVerificationRules and PubisherVerificationRules to keep track of and assist in making sure that all tests propagate properly between Subscriber, Publisher and Processor.
@smaldini nevermind the annotations, they are only documentation AFAIK |
7aadee3
to
d380acc
Compare
Still testing (and failing) 2.12 for me without override Noop. |
The annotations are just docs. See |
As annotation is just doc, maybe we should remove |
// Sorry, my crappy internet connection made me think I sent an additional comment here but it seems I did not. I'm in the mountains for a week - sorry for not being too responsive over this week! I'll open a separate issue about what to do with those annotations. Seems that they being just docs can be quite misleading - we're all accustomed to annotations "doing all the things" I guess. An idea would be to instead of separate Made it a ticket: #190 |
TCK Verification methods with "required"/"optional"/"unverified"/"stochastic" instead. This means that it is easy to change level by introducing a new method prefixed with the updated requirement and deprecating the old method.
This PR should also fix #190 |
@reactive-streams/contributors Please review/vote/ask for more time before the 2nd of January 2015, this change needs to go into an RC2. |
errorPublisherTest(new PublisherTestRun<T>() { | ||
@Override @Test | ||
public void optional___spec112_mayRejectCallsToSubscribeIfPublisherIsUnableOrUnwillingToServeThemRejectionMustTriggerOnErrorInsteadOfOnSubscribe() throws Throwable { | ||
errorPublisherTest(new PublisherTestRun<T>() { //FIXME shouldn't this be some "optional" method??? Method was marked as @Additional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ktoso would like you take on this comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, this is a case of confusing naming I think. It is indeed optional - the way errorPublisherTest
works is "if the publisher I get from createErrorPublisher()
(user does this), is not null, I'm doing to run this test"). Let's rename the method name to optionalErrorPublisherTest
and we're good here IMO
optionalActivePublisherTest(3, false, new PublisherTestRun<T>() { | ||
@Override @Test | ||
public void required___spec113_mustProduceTheSameElementsInTheSameSequenceToAllOfItsSubscribersWhenRequestingManyUpfront() throws Throwable { | ||
optionalActivePublisherTest(3, false, new PublisherTestRun<T>() { // FIXME shouldn't this be a non-"optional" method??? Method was marked as @Required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ktoso would like you take on this comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The optional method is here because "same order of elements" in this test is checked after a number of elements being signalled. But what if the publisher can only ever signal 1 time (e.g. FutureSource
), in that case the TCK skips this test even though its "required", but well, this Publisher cannot be tested using this test.
This PR misses updating the |
@ktoso Nice catch, I'll have a look at the RCK README and see if I can improve it. |
I also touched the README in my PR, I think we'll get conflicts on that one hm.. |
ee3408e
to
9cce1cd
Compare
Renamed "unverified" to "untested" (same length as "optional" and "required") |
Went through the FIXMEs, it's those cases we've added recently to support weird publishers "can only signal 1 element" and "can never signal oncomplete" etc. Those tests are required in general, but can be forced to skip if you configure the TCK by telling it "my publisher can not signal completion" etc. These are explained in the tck/README.md section 'Testing Publishers with restricted capabilities'. Let me know if we should improve the wording there or do something else. |
Single underscore + rename works great, thanks! :) |
9cce1cd
to
e6f057f
Compare
Pushed changes based on @ktoso's feedback |
LGTM :-) |
…stically verified. Introduces prefix naming for TCK rules using "required_", "optional_", "untested_" and "stochastic_". Updates tck/README.md to reflect these changes Deletes the Annotations.java file as the annotations are no longer used. Introduces interfaces for the TCK test methods so it is possible to keep track of implementations, perform deprecations etc.
e6f057f
to
41cd764
Compare
No objections, merging :) |
…orverification-√ Removes the use of annotations, switches to test prefix naming
Introduces interfaces to specify which tests should be implemented for the different *Verification classes, which makes it much easier to keep track that test cases have been properly implemented.
IMPORTANT Fixes #188 by making the 2.12 rule "untested" in the TCK as it is not reasonably testable.
Removes the annotations that were used for TCK documentation, since they were confusing and not up to date. Replaces them with prefix naming. ("optional"/"required"/"untested"/"stochastic")