From 6ada9763294006bed34b5838ac2bba3a2a1c9b6e Mon Sep 17 00:00:00 2001 From: Alan Protasio Date: Tue, 3 Dec 2024 13:59:18 -0800 Subject: [PATCH] Fix flaky TestExpendedPostingsCacheIsolation test (#6395) Signed-off-by: alanprot --- pkg/ingester/ingester_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/ingester/ingester_test.go b/pkg/ingester/ingester_test.go index 31566f9b30..5c0f22c78b 100644 --- a/pkg/ingester/ingester_test.go +++ b/pkg/ingester/ingester_test.go @@ -5134,6 +5134,11 @@ func TestExpendedPostingsCacheIsolation(t *testing.T) { require.NoError(t, services.StartAndAwaitRunning(context.Background(), i)) defer services.StopAndAwaitTerminated(context.Background(), i) //nolint:errcheck + // Wait until the ingester is ACTIVE + test.Poll(t, 100*time.Millisecond, ring.ACTIVE, func() interface{} { + return i.lifecycler.GetState() + }) + numberOfTenants := 100 wg := sync.WaitGroup{}