mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: fix flakes in TestWorkspaceAutobuild due to incorrect tick time (#19398)
we missed these in the previous PR, we find `tickTime2` and pass it to the `tickCh`, but we were incorrectly passing `tickTime` to `UpdateProvisionerLastSeenAt` in some places Signed-off-by: Callum Styan <callumstyan@gmail.com>
This commit is contained in:
@@ -1277,7 +1277,7 @@ func TestWorkspaceAutobuild(t *testing.T) {
|
||||
|
||||
// We should see the workspace get stopped now.
|
||||
tickTime2 := ws.LastUsedAt.Add(inactiveTTL * 2)
|
||||
coderdtest.UpdateProvisionerLastSeenAt(t, db, p.ID, tickTime)
|
||||
coderdtest.UpdateProvisionerLastSeenAt(t, db, p.ID, tickTime2)
|
||||
tickCh <- tickTime2
|
||||
stats = <-statsCh
|
||||
require.Len(t, stats.Errors, 0)
|
||||
|
||||
Reference in New Issue
Block a user