-
Notifications
You must be signed in to change notification settings - Fork 1k
test: fix TestCache_DeploymentStats flake #19683
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
Can we stop using |
@spikecurtis I've gone with an approach similar to that used by If this approach looks good to you, I'll update the other tests to also no longer use EDIT: An unrelated test is failing because it calls |
In general, Also, Quartz mocks are not really designed for integration tests where you have a whole lot of things calling into the clock with different intervals. |
1c19d4f
to
3093efd
Compare
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.
Suggestion inline about only triggering a single tick and using Advance rather than AdvanceNext, but I don't need to review again. Nice work.
🎉 |
Closes coder/internal#961
Likely the same deal as in #19599, the body of
require.Eventually
now fires immediately, when it used to fire after 250ms (the interval). Presumably, the deployment stats become ready before the vs code session count gets incremented. This was never an issue with the 250ms delay, as this flake has only cropped up after the testify version bump.We'll fix the issue by making it possible to wait for a full metrics cache refresh, i.e. removing
require.Eventually
in this test altogether.