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:
Callum Styan
2025-08-19 09:24:40 -07:00
committed by GitHub
parent b6abcba942
commit 9e5c83ae0d
+1 -1
View File
@@ -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)