Skip to content

Conversation

@spikecurtis
Copy link
Contributor

@spikecurtis spikecurtis commented Dec 19, 2025

fixes coder/internal#1203

The matcher I wrote for TestAgentConnectionMonitor tested that last_disconnected_at was strictly after the start of the test to ensure it was updated.

This is too strict of a test because Windows in particular doesn't have high-resolution timers, so it's entirely possible to get the exact same timestamp from subsequent calls to time.Now(). This PR switches the test to not before to cover this case. The results are just as valid because we always initialize the last_disconnected_at to something well before the test starts.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@spikecurtis spikecurtis requested a review from mafredri December 19, 2025 06:20
@spikecurtis spikecurtis marked this pull request as ready for review December 19, 2025 06:20
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.

flake: TestAgentConnectionMonitor_StartClose

2 participants