File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,11 @@ import (
14
14
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/cluster"
15
15
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/option"
16
16
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/registry"
17
+ "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil/task"
17
18
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/spec"
18
19
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test"
19
20
"github.com/cockroachdb/cockroach/pkg/roachprod/install"
21
+ "github.com/cockroachdb/cockroach/pkg/roachprod/logger"
20
22
"github.com/jackc/pgx/v5"
21
23
"github.com/stretchr/testify/require"
22
24
)
@@ -315,10 +317,11 @@ func testParallelConnections(
315
317
t .L ().Printf ("Creating connection: %d." , i + 1 )
316
318
semaphore <- struct {}{}
317
319
318
- go func (index int ) {
320
+ t . Go ( func (ctx context. Context , _ * logger. Logger ) error {
319
321
defer func () { <- semaphore }()
320
- createConnectionFunc (index )
321
- }(i )
322
+ createConnectionFunc (i )
323
+ return nil
324
+ }, task .Name (fmt .Sprintf ("create-connection-%d" , i )))
322
325
}
323
326
324
327
// Ensure all connections have been created.
You can’t perform that action at this time.
0 commit comments