Skip to content

Commit 112e20a

Browse files
committed
fixup! try to fix batcher flake again
1 parent 122291c commit 112e20a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

coderd/batchstats/batcher_internal_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,15 @@ func TestBatchStats(t *testing.T) {
105105
require.Len(t, stats, 2, "should have stats for both workspaces")
106106

107107
// Ensures that a subsequent flush pushes all the remaining data
108-
t4 := database.Now()
108+
t4 := t3.Add(time.Millisecond)
109109
tick <- t4
110110
f2 := <-flushed
111111
t.Logf("flush 4 completed")
112112
expectedCount := defaultBufferSize - f
113113
require.Equal(t, expectedCount, f2, "did not flush expected remaining rows")
114114

115115
// Ensure that a subsequent flush does not push stale data.
116-
t5 := database.Now()
116+
t5 := t4.Add(time.Millisecond)
117117
tick <- t5
118118
f = <-flushed
119119
require.Zero(t, f, "expected zero stats to have been flushed")

0 commit comments

Comments
 (0)