mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
f6556fce9f
The test flake can be verified by setting `ReportInterval` to a really low value, like `100 * time.Millisecond`. We now set it to a really high value to avoid triggering flush without manually calling the function in test. This can easily happen because the default value is 30s and we run tests in parallel. The assertion typically happens such that: [use workspace] -> [fetch previous last used] -> [flush] -> [fetch new last used] When this edge case is triggered: [use workspace] -> [report interval flush] -> [fetch previous last used] -> [flush] -> [fetch new last used] In this case, both the previous and new last used will be the same, breaking the test assertion. Fixes coder/internal#960 Fixes coder/internal#975