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

Improve reliability of GoroutineMonitor stop check in tests #4519

Open
OhmSpectator opened this issue Jan 13, 2025 · 0 comments
Open

Improve reliability of GoroutineMonitor stop check in tests #4519

OhmSpectator opened this issue Jan 13, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@OhmSpectator
Copy link
Member

The TestGoroutineMonitorStops test in pkg/pillar/cmd/watcher/watcher_test.go sometimes fails with the error:

=== FAIL: cmd/watcher TestGoroutineMonitorStops (3.03s)
Failed to write to log, write |1: file already closed
    watcher_test.go:518: Expected log output to contain 'Stopping goroutines monitor'

This failure is likely due to the log output pipe being closed before the goroutines monitor has fully stopped and logged the "Stopping goroutines monitor" message. To make the stop check more reliable, we should either increase the wait time to ensure the goroutine monitor has entirely stopped before closing the log output pipe or introduce a reliable way to check that the goroutine is stopped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant