From 6f1284ac93b54def89fbec6c7d83d030a88c21c6 Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov Date: Wed, 20 Sep 2023 17:41:33 +0200 Subject: [PATCH] Fix exit condition of TestQuerierIndexQueriesRace The test was introduced in # but was changed during the code review and not reran with the faulty code since then. Closes # Signed-off-by: Dimitar Dimitrov --- tsdb/querier_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsdb/querier_test.go b/tsdb/querier_test.go index cee7dac90..fc6c68801 100644 --- a/tsdb/querier_test.go +++ b/tsdb/querier_test.go @@ -2252,7 +2252,7 @@ func TestQuerierIndexQueriesRace(t *testing.T) { func appendSeries(t *testing.T, ctx context.Context, wg *sync.WaitGroup, h *Head) { defer wg.Done() - for i := 0; ctx.Err() != nil; i++ { + for i := 0; ctx.Err() == nil; i++ { app := h.Appender(context.Background()) _, err := app.Append(0, labels.FromStrings(labels.MetricName, "metric", "seq", strconv.Itoa(i), "always_0", "0"), 0, 0) require.NoError(t, err)