Skip to content

Agent Mesh

Update tests/integration/minimal_helpers_test.go

Antonio Ojeadbbf790cbec7
diff --git a/tests/integration/minimal_helpers_test.go b/tests/integration/minimal_helpers_test.go
index c30d7e29..abb51d21 100644
--- a/tests/integration/minimal_helpers_test.go
+++ b/tests/integration/minimal_helpers_test.go
@@ -531,11 +531,11 @@ var ephemeralPortLow = func() int {
// portCursor starts at a pid-derived offset so concurrent test processes
// walk different parts of the range instead of racing for the same ports.
-var portCursor = func() *atomic.Int64 {
- var cursor atomic.Int64
- cursor.Store(int64(os.Getpid()))
- return &cursor
-}()
+var portCursor atomic.Int64
+
+func init() {
+ portCursor.Store(int64(os.Getpid()))
+}
func getFreePort(t *testing.T) int {
t.Helper()