Skip to content

Commit

Permalink
fix: data race in distributor tests (grafana#15423)
Browse files Browse the repository at this point in the history
  • Loading branch information
na-- authored and mveitas committed Jan 6, 2025
1 parent 543eaae commit 3bbb741
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/distributor/distributor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,8 @@ func TestDistributorPushToKafka(t *testing.T) {
require.Equal(t, 1, len(ingesters[0].pushed))
require.Equal(t, 1, len(ingesters[1].pushed))
require.Eventually(t, func() bool {
ingesters[2].mu.Lock()
defer ingesters[2].mu.Unlock()
return len(ingesters[2].pushed) == 1
}, time.Second, 10*time.Millisecond)
})
Expand Down

0 comments on commit 3bbb741

Please sign in to comment.