-
Notifications
You must be signed in to change notification settings - Fork 291
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
internal/daemon/worker: speed up multi-worker tests #5370
Conversation
Instead of sleeping, we can poll for the desired state. Also, run shutdowns in parallel.
require.Eventually( | ||
func() bool { | ||
t.Log("Checking worker status") | ||
workers, err := serversRepo.ListWorkers(controllerContext, []string{"global"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Is NewTestMultihopWorkers
ever called by parallel tests? Could this impact the output of ListWorkers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not as long as each test is using it's own controller, which I think we have to assume the parallel tests are doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Unfortunately, this started causing the enterprise tests to break in an unexpected way. Reverting to spend some more time testing the changes.
Instead of sleeping, we can poll for the desired state. Also, run shutdowns in parallel. This mostly affects the enterprise tests that start multiple workers.