diff options
Diffstat (limited to 'lib/go/thrift/serializer_test.go')
-rw-r--r-- | lib/go/thrift/serializer_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/go/thrift/serializer_test.go b/lib/go/thrift/serializer_test.go index 78b67453b..425ce0691 100644 --- a/lib/go/thrift/serializer_test.go +++ b/lib/go/thrift/serializer_test.go @@ -243,7 +243,7 @@ func TestSerializer(t *testing.T) { func TestSerializerPoolAsync(t *testing.T) { var wg sync.WaitGroup - var counter int64 + var counter atomic.Int64 s := NewTSerializerPool(NewTSerializer) d := NewTDeserializerPool(NewTDeserializer) f := func(i int64) bool { @@ -251,7 +251,7 @@ func TestSerializerPoolAsync(t *testing.T) { go func() { defer wg.Done() t.Run( - fmt.Sprintf("#%d-%d", atomic.AddInt64(&counter, 1), i), + fmt.Sprintf("#%d-%d", counter.Add(1), i), func(t *testing.T) { m := MyTestStruct{ Int64: i, |