Skip to content

Commit

Permalink
fix: data race in distributor tests (#15423)
Browse files Browse the repository at this point in the history
  • Loading branch information
na-- authored Dec 16, 2024
1 parent bdbb009 commit b8168a8
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 b8168a8

Please sign in to comment.