Skip to content

test flake: TestWatchdog_Timeout #12030

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

Closed
johnstcn opened this issue Feb 6, 2024 · 0 comments · Fixed by #12031
Closed

test flake: TestWatchdog_Timeout #12030

johnstcn opened this issue Feb 6, 2024 · 0 comments · Fixed by #12031
Assignees
Labels
s4 Internal bugs (e.g. test flakes), extreme edge cases, and bug risks

Comments

@johnstcn
Copy link
Member

johnstcn commented Feb 6, 2024

Seen here: https://github.com/coder/coder/actions/runs/7801997439/job/21278471914

=== Failed
=== FAIL: coderd/database/pubsub TestWatchdog_Timeout (10.00s)
    t.go:99: 2024-02-06 15:26:26.334 [debu]  context done; exiting publishLoop
    t.go:99: 2024-02-06 15:26:26.334 [debu]  context done; exiting subscribeMonitor
    watchdog_test.go:85: timeout
@johnstcn johnstcn added flake s4 Internal bugs (e.g. test flakes), extreme edge cases, and bug risks labels Feb 6, 2024
@cdr-bot cdr-bot bot added bug labels Feb 6, 2024
@spikecurtis spikecurtis self-assigned this Feb 6, 2024
spikecurtis added a commit that referenced this issue Feb 6, 2024
Fixes #12030

This is a good example of the kind of thing I'd like to address with a time-testing lib.  The problem is that there is a race between the watchdog starting it's timer and the test incrementing the time.  What would make this easier is if the time-testing library could wait for and assert the call to start the timer before incrementing the time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s4 Internal bugs (e.g. test flakes), extreme edge cases, and bug risks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants