Skip to content

Commit 90526c6

Browse files
committed
systemtest: fix spurious test failure
1 parent 754a483 commit 90526c6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

systemtest/sampling_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package systemtest_test
1919

2020
import (
2121
"context"
22+
"errors"
2223
"fmt"
2324
"strings"
2425
"testing"
@@ -226,6 +227,9 @@ func refreshPeriodically(t *testing.T, interval time.Duration, index ...string)
226227
case <-ticker.C:
227228
}
228229
if _, err := systemtest.Elasticsearch.Do(ctx, &request, nil); err != nil {
230+
if errors.Is(err, context.Canceled) {
231+
return nil
232+
}
229233
return err
230234
}
231235
}

0 commit comments

Comments
 (0)