test: removing a rare flake in tcp proxy integraion test#5919
Merged
alyssawilk merged 1 commit intoenvoyproxy:masterfrom Feb 12, 2019
Merged
test: removing a rare flake in tcp proxy integraion test#5919alyssawilk merged 1 commit intoenvoyproxy:masterfrom
alyssawilk merged 1 commit intoenvoyproxy:masterfrom
Conversation
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
junr03
approved these changes
Feb 12, 2019
fredlas
pushed a commit
to fredlas/envoy
that referenced
this pull request
Mar 5, 2019
…5919) Occasionally we read all the data but not the FIN in waitForData() waitForDisconnect() would get the half close, and trigger the notification in FakeRawConnection::ReadFilter::onData Unfortunately this results in a race because in ConnectionImpl we do the onRead, passing data to the filters, before checking bothSidesHalfClosed and actually closing the socket, so when waitForDisconnect() checked connection status it could occasionally still look connected. Fixing by explicitly waiting for half-close. _Risk Level_: low (test only) _Testing_: 1k runs pass _Docs Changes_: n/a _Release Notes_: n/a Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Fred Douglas <fredlas@google.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Occasionally we read all the data but not the FIN in waitForData()
waitForDisconnect() would get the half close, and trigger the notification in FakeRawConnection::ReadFilter::onData
Unfortunately this results in a race because in ConnectionImpl we do the onRead, passing data to the filters, before checking bothSidesHalfClosed and actually closing the socket, so when waitForDisconnect() checked connection status it could occasionally still look connected.
I was going to solve in the fake upstream by simply not calling connection_.notifyOne() for a 0 byte onData with fin = true but that would break waitForHalfClose
Risk Level: low (test only)
Testing: 1k runs pass
Docs Changes: n/a
Release Notes: n/a