@@ -352,7 +352,7 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
352
352
}
353
353
}
354
354
355
- // start with suite value
355
+ // start with suite value which should be based on a 3 worker node cluster
356
356
parallelism := suite .Parallelism
357
357
logrus .Infof ("Suite defined parallelism %d" , parallelism )
358
358
@@ -361,17 +361,17 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
361
361
if err != nil {
362
362
logrus .Errorf ("Failed to get cluster node counts: %v" , err )
363
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
364
+ // default to 1/3 the defined parallelism value per worker but use the min of that
365
+ // and the current parallelism value so we don't increase parallelism
366
+ if workerNodes > 0 && parallelism > 0 {
367
+ workerParallelism := max ( 1 , parallelism / 3 ) * workerNodes
368
368
logrus .Infof ("Parallelism based on worker node count: %d" , workerParallelism )
369
369
parallelism = min (parallelism , workerParallelism )
370
370
}
371
371
}
372
372
373
373
// if 0 set our min value
374
- if parallelism = = 0 {
374
+ if parallelism < = 0 {
375
375
parallelism = 10
376
376
}
377
377
@@ -910,7 +910,7 @@ func determineEnvironmentFlags(ctx context.Context, upgrade bool, dryRun bool) (
910
910
envFlagBuilder .AddTopology (& singleReplicaTopology )
911
911
}
912
912
913
- //Additional flags can only be determined if we are able to obtain the clusterState
913
+ // Additional flags can only be determined if we are able to obtain the clusterState
914
914
if clusterState != nil {
915
915
envFlagBuilder .AddAPIGroups (clusterState .APIGroups .UnsortedList ()... ).
916
916
AddFeatureGates (clusterState .EnabledFeatureGates .UnsortedList ()... )
@@ -923,7 +923,7 @@ func determineEnvironmentFlags(ctx context.Context, upgrade bool, dryRun bool) (
923
923
924
924
arch := "Unknown"
925
925
if len (clusterState .Masters .Items ) > 0 {
926
- //TODO(sgoeddel): eventually, we may need to check every node and pass "multi" as the value if any of them differ from the masters
926
+ // TODO(sgoeddel): eventually, we may need to check every node and pass "multi" as the value if any of them differ from the masters
927
927
arch = clusterState .Masters .Items [0 ].Status .NodeInfo .Architecture
928
928
}
929
929
envFlagBuilder .AddArchitecture (arch )
0 commit comments