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 flaky PrematureClosureBeforeResponsePayloadBodyTest#notAllHeadersReceived() #1504

Merged
merged 2 commits into from
Apr 20, 2021

Conversation

idelpivnitskiy
Copy link
Member

Motivation:

This test is affected by a race between propagating onError through
DefaultNettyConnection#enrichError and receiving FIN from the server
(ChannelInputShutdownReadComplete). The exception is always correct, but
it can be wrapped with CloseEventObservedException if the FIN reached the
client.

Modifications:

  • Improve test's assertion to check the exception or its cause;

Result:

Fixes #1224.

…sReceived()`

Motivation:

This test is affected by a race between propagating `onError` through
`DefaultNettyConnection#enrichError` and receiving FIN from the server
(`ChannelInputShutdownReadComplete`). The exception is always correct, but
it can be wrapped with `CloseEventObservedException` if the FIN reached the
client.

Modifications:

- Improve test's assertion to check the exception or its cause;

Result:

Fixes apple#1224.
@idelpivnitskiy idelpivnitskiy requested a review from tkountis April 20, 2021 05:43
@idelpivnitskiy idelpivnitskiy merged commit c294cc5 into apple:main Apr 20, 2021
@idelpivnitskiy idelpivnitskiy deleted the notAllHeadersReceived branch April 20, 2021 18:24
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.

PrematureClosureBeforeResponsePayloadBodyTest.notAllHeadersReceived test failure
3 participants