Skip to content

Commit 3b0dba3

Browse files
sandy2008claude
andcommitted
[BUGFIX] Ingester: switch test atomic helpers to go.uber.org/atomic
Cortex's faillint lint rule forbids direct use of "sync/atomic" and requires "go.uber.org/atomic" instead. Replace atomic.Bool and atomic.Value (storing string) with go.uber.org/atomic.Bool and go.uber.org/atomic.String in the regression test added for #7531. No production-code changes; behaviour is identical. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Sandy Chen <Yuxuan.Chen@morganstanley.com>
1 parent 23d4abc commit 3b0dba3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/ingester/active_queried_series_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import (
44
"context"
55
"fmt"
66
"sync"
7-
"sync/atomic"
87
"testing"
98
"time"
109

1110
"github.com/go-kit/log"
1211
"github.com/prometheus/prometheus/model/labels"
1312
"github.com/stretchr/testify/assert"
1413
"github.com/stretchr/testify/require"
14+
"go.uber.org/atomic"
1515

1616
"github.com/cortexproject/cortex/pkg/util/services"
1717
)
@@ -488,7 +488,7 @@ func TestActiveQueriedSeriesService_NoSendOnClosedChannelOnShutdown(t *testing.T
488488

489489
var (
490490
panicked atomic.Bool
491-
panicMsg atomic.Value // string
491+
panicMsg atomic.String
492492
wg sync.WaitGroup
493493
producing sync.WaitGroup
494494
gate = make(chan struct{}) // released after Stop() returns

0 commit comments

Comments
 (0)