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 TestFastDisconnect identify test #1200

Merged
merged 2 commits into from
Sep 28, 2021
Merged

Conversation

marten-seemann
Copy link
Contributor

Fixes #1157.

@@ -36,10 +37,11 @@ func TestFastDisconnect(t *testing.T) {

// Kill the connection, and make sure we're completely disconnected.
s.Conn().Close()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem here was that sometimes, we'd end up with two connections (for example, one TCP and one QUIC connection). Of course, calling s.Conn().Close() here would only close one of them, which is why the loop on the next line would never terminate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alternative fix would be to loop over all connections and close them.

Copy link
Contributor

Choose a reason for hiding this comment

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

actually, let's do that -- it's the right thing to do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, done

@marten-seemann marten-seemann merged commit 72b5824 into master Sep 28, 2021
@marten-seemann marten-seemann deleted the fix-flaky-id-test branch September 29, 2021 14:20
@aschmahmann aschmahmann mentioned this pull request Dec 1, 2021
80 tasks
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.

flaky FastDisconnect test
2 participants