Skip to content

Commit c98710b

Browse files
committed
trt-2257: restore default parallelism
1 parent e05c5fd commit c98710b

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

pkg/test/ginkgo/cmd_runsuite.go

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -352,33 +352,19 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
352352
}
353353
}
354354

355-
// start with suite value
356-
parallelism := suite.Parallelism
357-
logrus.Infof("Suite defined parallelism %d", parallelism)
358-
359-
// adjust based on the number of workers
360-
totalNodes, workerNodes, err := getClusterNodeCounts(ctx, restConfig)
361-
if err != nil {
362-
logrus.Errorf("Failed to get cluster node counts: %v", err)
363-
} else {
364-
// default to 10 concurrent tests per worker but use the min of that
365-
// and the current parallelism value
366-
if workerNodes > 0 {
367-
workerParallelism := 10 * workerNodes
368-
logrus.Infof("Parallelism based on worker node count: %d", workerParallelism)
369-
parallelism = min(parallelism, workerParallelism)
370-
}
355+
parallelism := o.Parallelism
356+
if parallelism == 0 {
357+
parallelism = suite.Parallelism
371358
}
372359

373-
// if 0 set our min value
374360
if parallelism == 0 {
375361
parallelism = 10
376362
}
377363

378-
// if explicitly set then use the specified value
379-
if o.Parallelism > 0 {
380-
parallelism = o.Parallelism
381-
logrus.Infof("Using specified parallelism value: %d", parallelism)
364+
// adjust based on the number of workers
365+
totalNodes, workerNodes, err := getClusterNodeCounts(ctx, restConfig)
366+
if err != nil {
367+
logrus.Errorf("Failed to get cluster node counts: %v", err)
382368
}
383369

384370
logrus.Infof("Total nodes: %d, Worker nodes: %d, Parallelism: %d", totalNodes, workerNodes, parallelism)

0 commit comments

Comments
 (0)