Skip to content

Rule 3.12 verification in subscriber whitebox now really checks it #121

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

Merged

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Oct 1, 2014

This PR reimplements the whitebox spec312_cancelMustRequestThePublisherToEventuallyStopSignaling, as @danarmak correctly noticed the previous implementation was not testing what it claimed it did.

Please review @danarmak, @viktorklang and @reactive-streams/contributors.
I may be a bit jet-lagged, please verify if this makes sense... :-)

Resolves #115

} catch (Throwable th) {
stillBeingSignalled = true;
}
} while (stillBeingSignalled);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no potentially infinite loops please ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, had a counter here actually but removed it (jet-lag might be showing...), thanks :-)
I'll add it back (as method, so it's configurable, in case impl. does "batches of 1000" etc).

@drewhk
Copy link
Contributor

drewhk commented Oct 1, 2014

Apart from small stuff LGTM on my side

@ktoso ktoso force-pushed the wip-rule312-for-reals-ktoso branch from 6a0bf30 to 9284dee Compare October 1, 2014 13:59
@ktoso
Copy link
Contributor Author

ktoso commented Oct 1, 2014

Just noticed that this is probably not enough (falsely green), will update this PR soon.

@ktoso ktoso force-pushed the wip-rule312-for-reals-ktoso branch 2 times, most recently from be98041 to 741503e Compare October 1, 2014 15:54
@ktoso
Copy link
Contributor Author

ktoso commented Oct 1, 2014

Now I'm happy with this test.
General concept is the same as previously, with these changes:

  • moved to Publisher tests, as it's a behaviour (for he must stop doing things, not the subscriber).
  • updated delegation to this test in processor specs
  • removed flow control on try/catch, which the previous impl had

I've used it and looked at it for a while and seems good, please review guys.

This verification is now moved to PublisherVerification, as it's a
publishers behavior (*it* must stop emiting, not the subscriber).

Resolves reactive-streams#115
@ktoso ktoso force-pushed the wip-rule312-for-reals-ktoso branch from 741503e to 79e1669 Compare October 1, 2014 16:19
onNextsSignalled += 1;
stillBeingSignalled = true;
}
} while (stillBeingSignalled && onNextsSignalled < totalDemand);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

much better!

@viktorklang
Copy link
Contributor

LGTM! 👍 Great work, @ktoso

@jbrisbin
Copy link

👍

@viktorklang
Copy link
Contributor

@reactive-streams/contributors Ample time has been given to comment, please give a 👍 or object to this change before the 24th of October GMT+0. If no one objects before that then this will be merged.

@viktorklang
Copy link
Contributor

@reactive-streams/contributors Merging

viktorklang added a commit that referenced this pull request Oct 24, 2014
Rule 3.12 verification in subscriber whitebox now really checks it
@viktorklang viktorklang merged commit 24b181d into reactive-streams:master Oct 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't make TCK IdentityProcessorVerification test 3.12 pass
4 participants