Skip to content

Commit 18e2dc8

Browse files
committed
roachtest: remove goroutine usage from ldap_connection_scale
Epic: None Release note: None
1 parent a5977aa commit 18e2dc8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pkg/cmd/roachtest/tests/ldap_connection_scale.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ import (
1414
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/cluster"
1515
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/option"
1616
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/registry"
17+
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil/task"
1718
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/spec"
1819
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test"
1920
"github.com/cockroachdb/cockroach/pkg/roachprod/install"
21+
"github.com/cockroachdb/cockroach/pkg/roachprod/logger"
2022
"github.com/jackc/pgx/v5"
2123
"github.com/stretchr/testify/require"
2224
)
@@ -315,10 +317,11 @@ func testParallelConnections(
315317
t.L().Printf("Creating connection: %d.", i+1)
316318
semaphore <- struct{}{}
317319

318-
go func(index int) {
320+
t.Go(func(ctx context.Context, _ *logger.Logger) error {
319321
defer func() { <-semaphore }()
320-
createConnectionFunc(index)
321-
}(i)
322+
createConnectionFunc(i)
323+
return nil
324+
}, task.Name(fmt.Sprintf("create-connection-%d", i)))
322325
}
323326

324327
// Ensure all connections have been created.

0 commit comments

Comments
 (0)