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

Fix flakiness in ResponseCancelTest #954

Merged
merged 1 commit into from
Mar 3, 2020

Conversation

NiteshKant
Copy link
Collaborator

Motivation

ResponseCancelTest is flaky due to a race condition that successful response or cancel will race to get to the connection filter and the result will either be success or failure.

Modification

  • cancel() and cancelAfterSuccessOnTransport() tests were both doing same actions unintentionally. Modified the test to reflect the intentions.
  • cancelAfterSuccessOnTransport() can either result in success or failure after the first request, modified test to verify the same.

Result

Fix tests.

__Motivation__

`ResponseCancelTest` is flaky due to a race condition that successful response or cancel will race to get to the connection filter and the result will either be success or failure.

__Modification__

- `cancel()` and `cancelAfterSuccessOnTransport()` tests were both doing same actions unintentionally. Modified the test to reflect the intentions.
- `cancelAfterSuccessOnTransport()` can either result in success or failure after the first request, modified test to verify the same.

__Result__

Fix tests.
Copy link
Member

@idelpivnitskiy idelpivnitskiy left a comment

Choose a reason for hiding this comment

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

🚀

@idelpivnitskiy
Copy link
Member

Looks like CI is happy. I will pull this in and update other PRs

@idelpivnitskiy idelpivnitskiy merged commit 90058f2 into apple:master Mar 3, 2020
@NiteshKant NiteshKant deleted the test-flak branch March 3, 2020 18:33
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