Skip to content

Commit 57fb6ec

Browse files
authored
Merge pull request #11558 from Nordix/scalability
🌱 Allow e2e scalability test to have custom deletion timeout
2 parents 1f7b388 + 64c5b3a commit 57fb6ec

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

test/e2e/scale.go

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,16 @@ func ScaleSpec(ctx context.Context, inputGetter func() ScaleSpecInput) {
415415
Concurrency: concurrency,
416416
FailFast: input.FailFast,
417417
WorkerFunc: func(ctx context.Context, inputChan chan string, resultChan chan workResult, wg *sync.WaitGroup) {
418-
deleteClusterAndWaitWorker(ctx, inputChan, resultChan, wg, input.BootstrapClusterProxy.GetClient(), namespace.Name, input.DeployClusterInSeparateNamespaces)
418+
deleteClusterAndWaitWorker(
419+
ctx,
420+
inputChan,
421+
resultChan,
422+
wg,
423+
input.BootstrapClusterProxy.GetClient(),
424+
namespace.Name,
425+
input.DeployClusterInSeparateNamespaces,
426+
input.E2EConfig.GetIntervals(specName, "wait-delete-cluster")...,
427+
)
419428
},
420429
})
421430
if err != nil {
@@ -659,7 +668,7 @@ func createClusterWorker(ctx context.Context, clusterProxy framework.ClusterProx
659668
}
660669
}
661670

662-
func deleteClusterAndWaitWorker(ctx context.Context, inputChan <-chan string, resultChan chan<- workResult, wg *sync.WaitGroup, c client.Client, defaultNamespace string, deployClusterInSeparateNamespaces bool) {
671+
func deleteClusterAndWaitWorker(ctx context.Context, inputChan <-chan string, resultChan chan<- workResult, wg *sync.WaitGroup, c client.Client, defaultNamespace string, deployClusterInSeparateNamespaces bool, intervals ...interface{}) {
663672
defer wg.Done()
664673

665674
for {
@@ -705,7 +714,7 @@ func deleteClusterAndWaitWorker(ctx context.Context, inputChan <-chan string, re
705714
framework.WaitForClusterDeleted(ctx, framework.WaitForClusterDeletedInput{
706715
Client: c,
707716
Cluster: cluster,
708-
})
717+
}, intervals...)
709718

710719
// Note: We only delete the namespace in this case because in the case where all clusters are deployed
711720
// to the same namespace deleting the Namespace will lead to deleting all clusters.

0 commit comments

Comments
 (0)