-
Notifications
You must be signed in to change notification settings - Fork 1.3k
🌱 Priorityqueue tests: Use synctest #3350
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
Conversation
2867fbe to
3efb516
Compare
|
/hold |
3efb516 to
ea64e21
Compare
|
Thx! /lgtm Backporting tests won't be much fun for a bit :) |
|
LGTM label has been added. DetailsGit tree hash: a8b4925c2d795cbe6ca43abfc7c9c7f7d8510bf4 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, sbueringer The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This change moves all tests in the priorityqueue where it makes sense to use synctest. Synctest provides a
Waitfunc we can use to wait until all goroutines in the test are durably blocked. This allows us to block after anAddcall until the priorityqueue has finished processing. Because we didn't have that, we previously usedtime.SleepandEventuallyif we wanted something to happen andConsistentlyif we wanted to assert that something does not happen. With this change, we don't need any of those three anymore.Because ginkgo doesn't support synctest, this change entails that we have to stop using it. To simplify reviewing, I've moved the tests from ginkgo to go test in the first commit and updated them to use synctest in the second commit.