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 <dimitar.dimitrov@grafana.com>
This commit is contained in:
Dimitar Dimitrov 2023-09-20 17:41:33 +02:00 committed by Bryan Boreham
parent bca9a79bca
commit 6f1284ac93

View file

@ -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)