Skip to content

Commit c710e08

Browse files
committed
chore: fix flaky test
1 parent d0bff72 commit c710e08

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

replications/internal/queue_management_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,14 @@ func TestEnqueueScan(t *testing.T) {
9797
}
9898

9999
// Check queue position
100+
// The sleep is not ideal, but we need to let the queue process some before closing it and there's not
101+
// currently a great way to check if it has run any.
102+
time.Sleep(50 * time.Millisecond)
100103
closeRq(rq)
101104
scan, err := rq.queue.NewScanner()
102105
t.Cleanup(func() {
103106
require.NoError(t, rq.queue.Close())
104107
})
105-
106108
if tt.writeFuncReturn == nil {
107109
require.ErrorIs(t, err, io.EOF)
108110
} else {

0 commit comments

Comments
 (0)