Skip to content

Commit edc0d36

Browse files
fix flaky test
1 parent 7caa770 commit edc0d36

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

provider/buffered/provider_test.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -258,16 +258,7 @@ func TestBatchProcessing(t *testing.T) {
258258
if err := provider.StartProviding(false, keys[2]); err != nil {
259259
t.Fatalf("StartProviding failed: %v", err)
260260
}
261-
262-
// Wait for batch to be triggered (should process all 3 operations in one batch)
263-
// Expect 2 signals: 1 for ProvideOnce (with 2 keys), 1 for StartProviding (with 1 key)
264-
for i := 0; i < 2; i++ {
265-
select {
266-
case <-fake.processed:
267-
case <-time.After(time.Second):
268-
t.Fatalf("Timeout waiting for operation %d to be processed", i+1)
269-
}
270-
}
261+
synctest.Wait()
271262

272263
// Close to ensure all operations are flushed
273264
provider.Close()

0 commit comments

Comments
 (0)