Skip to content
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

TestSubscription#requestedEquals(0) incorrectly validates the value #1642

Merged
merged 1 commit into from
Jun 28, 2021

Conversation

idelpivnitskiy
Copy link
Member

Motivation:

TestSubscription#requestedEquals depends on the passed value and if
value == 0 it does not check the current cumulative value of requested
elements, it only checks if request(long) was ever invoked or not.

Modifications:

  • Fix validation in TestSubscription#requestedEquals;
  • Adjust existing tests to account for new behavior;

Result:

TestSubscription#requestedEquals(0) validates that request(long) was
invoked and the current cumulative value if equal to 0.

Motivation:

`TestSubscription#requestedEquals` depends on the passed `value` and if
`value == 0` it does not check the current cumulative value of requested
elements, it only checks if `request(long)` was ever invoked or not.

Modifications:

- Fix validation in `TestSubscription#requestedEquals`;
- Adjust existing tests to account for new behavior;

Result:

`TestSubscription#requestedEquals(0)` validates that `request(long)` was
invoked and the current cumulative value if equal to `0`.
@idelpivnitskiy idelpivnitskiy merged commit d4c06ef into apple:main Jun 28, 2021
@idelpivnitskiy idelpivnitskiy deleted the requestedEquals branch June 28, 2021 16:49
bondolo pushed a commit to bondolo/servicetalk that referenced this pull request Jul 2, 2021
…apple#1642)

Motivation:

`TestSubscription#requestedEquals` depends on the passed `value` and if
`value == 0` it does not check the current cumulative value of requested
elements, it only checks if `request(long)` was ever invoked or not.

Modifications:

- Fix validation in `TestSubscription#requestedEquals`;
- Adjust existing tests to account for new behavior;

Result:

`TestSubscription#requestedEquals(0)` validates that `request(long)` was
invoked and the current cumulative value if equal to `0`.
bondolo pushed a commit to bondolo/servicetalk that referenced this pull request Jul 2, 2021
…apple#1642)

Motivation:

`TestSubscription#requestedEquals` depends on the passed `value` and if
`value == 0` it does not check the current cumulative value of requested
elements, it only checks if `request(long)` was ever invoked or not.

Modifications:

- Fix validation in `TestSubscription#requestedEquals`;
- Adjust existing tests to account for new behavior;

Result:

`TestSubscription#requestedEquals(0)` validates that `request(long)` was
invoked and the current cumulative value if equal to `0`.
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.

2 participants