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: deterministic check for FlowDeleted #397

Merged
merged 3 commits into from
Nov 7, 2023

Conversation

stephen-soltesz
Copy link
Contributor

@stephen-soltesz stephen-soltesz commented Nov 7, 2023

The previous test implementation was flaky. This change uses a channel to signal that the FlowDeleted path has been reached.

While the srv.Close() will prevent new connections, and the downloadHelper() closes the client connection, there is still an independent handler goroutine that reaches the FlowDeleted path after a short delay. Rather than using a larger static delay, this change sets a maximum delay and waits for the deleted channel to close, allowing the test to stop as quickly as it's able to.


This change is Reviewable

Copy link
Contributor

@cristinaleonr cristinaleonr left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! 1 of 1 approvals obtained

@stephen-soltesz stephen-soltesz merged commit 18e4fa9 into main Nov 7, 2023
5 checks passed
@stephen-soltesz stephen-soltesz deleted the sandbox-soltesz-fix-flaky branch November 7, 2023 16:25
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