@@ -352,7 +352,7 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
352352 }
353353 }
354354
355- // start with suite value
355+ // start with suite value which should be based on a 3 worker node cluster
356356 parallelism := suite .Parallelism
357357 logrus .Infof ("Suite defined parallelism %d" , parallelism )
358358
@@ -361,17 +361,17 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
361361 if err != nil {
362362 logrus .Errorf ("Failed to get cluster node counts: %v" , err )
363363 } 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
368368 logrus .Infof ("Parallelism based on worker node count: %d" , workerParallelism )
369369 parallelism = min (parallelism , workerParallelism )
370370 }
371371 }
372372
373373 // if 0 set our min value
374- if parallelism = = 0 {
374+ if parallelism < = 0 {
375375 parallelism = 10
376376 }
377377
@@ -910,7 +910,7 @@ func determineEnvironmentFlags(ctx context.Context, upgrade bool, dryRun bool) (
910910 envFlagBuilder .AddTopology (& singleReplicaTopology )
911911 }
912912
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
914914 if clusterState != nil {
915915 envFlagBuilder .AddAPIGroups (clusterState .APIGroups .UnsortedList ()... ).
916916 AddFeatureGates (clusterState .EnabledFeatureGates .UnsortedList ()... )
@@ -923,7 +923,7 @@ func determineEnvironmentFlags(ctx context.Context, upgrade bool, dryRun bool) (
923923
924924 arch := "Unknown"
925925 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
927927 arch = clusterState .Masters .Items [0 ].Status .NodeInfo .Architecture
928928 }
929929 envFlagBuilder .AddArchitecture (arch )
0 commit comments