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

test: fix flaky drain test #4

Merged
merged 3 commits into from
Feb 3, 2021
Merged

test: fix flaky drain test #4

merged 3 commits into from
Feb 3, 2021

Conversation

rolinh
Copy link
Member

@rolinh rolinh commented Feb 3, 2021

See commits for details. This should fix #2 (I could not reproduce the failure with over a 100 test runs locally).

There is no reason to hold the mutex while waiting for the routines to
return, thus release the mutex early.

While here, add a comment that explains why it's safe to close the tasks
channel.

Signed-off-by: Robin Hahling <[email protected]>
This check turns out to be flaky. It should be implemented in a separate
test instead.

Signed-off-by: Robin Hahling <[email protected]>
@rolinh rolinh requested a review from tklauser February 3, 2021 11:06
Copy link
Member

@tklauser tklauser left a comment

Choose a reason for hiding this comment

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

LGTM. Wasn't able to reproduce locally with 100 test runs either.

wp.wg.Wait()

// At this point, all routines have returned. This means that Submit is not
Copy link
Member

Choose a reason for hiding this comment

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

💯 thanks for adding that comment.

@rolinh rolinh merged commit 986656c into master Feb 3, 2021
@rolinh rolinh deleted the pr/rolinh/fix-flaky-test branch February 3, 2021 11:22
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.

ci: deadlock while running unit tests (concurrent drain operation)
2 participants