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

Cleanup goroutines on health.Stop #1325

Merged
merged 2 commits into from
Apr 11, 2023
Merged

Cleanup goroutines on health.Stop #1325

merged 2 commits into from
Apr 11, 2023

Conversation

StephenButtolph
Copy link
Contributor

Why this should be merged

Fixes a flaky test.

How this works

Stop will now block until all of the goroutines have shut down.

How this was tested

CI + inspection

@StephenButtolph StephenButtolph self-assigned this Apr 11, 2023
@StephenButtolph StephenButtolph added monitoring This primarily focuses on logs, metrics, and/or tracing cleanup Code quality improvement labels Apr 11, 2023
@StephenButtolph StephenButtolph added this to the v1.10.0 (Cortina) milestone Apr 11, 2023
go func() {
ticker := time.NewTicker(freq)
defer ticker.Stop()
defer func() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

yo dawg I heard you like anonymous functions so I put an anonymous function in your anonymous function in an anonymous function so you can func while you func

@StephenButtolph StephenButtolph merged commit 4a7ad6a into dev Apr 11, 2023
@StephenButtolph StephenButtolph deleted the block-on-health-stop branch April 11, 2023 20:46
abi87 pushed a commit that referenced this pull request Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code quality improvement monitoring This primarily focuses on logs, metrics, and/or tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants