From 2e55d2ae5b11c8acd64867ca67769c09f9458042 Mon Sep 17 00:00:00 2001 From: jpayne3506 Date: Wed, 29 Nov 2023 11:11:45 -0800 Subject: [PATCH] ci: add OS scale timeout --- test/integration/load/load_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/integration/load/load_test.go b/test/integration/load/load_test.go index 89a38c4a18..f8dc8b04be 100644 --- a/test/integration/load/load_test.go +++ b/test/integration/load/load_test.go @@ -40,6 +40,13 @@ var noopDeploymentMap = map[string]string{ "linux": manifestDir + "/noop-deployment-linux.yaml", } +// This map is used exclusively for TestLoad. Windows is expected to take 10-15 minutes per iteration. +// Will change this as scale testing results are verified. This will ensure we keep a standard performance metric. +var scaleTimeoutMap = map[string]time.Duration{ + "windows": 15 * time.Minute, + "linux": 10 * time.Minute, +} + /* In order to run the scale tests, you need a k8s cluster and its kubeconfig. If no kubeconfig is passed, the test will attempt to find one in the default location for kubectl config. @@ -64,8 +71,7 @@ todo: consider adding the following scenarios */ func TestLoad(t *testing.T) { clientset := kubernetes.MustGetClientset() - - ctx, cancel := context.WithTimeout(context.Background(), 30*time.Minute) + ctx, cancel := context.WithTimeout(context.Background(), time.Duration(testConfig.Iterations)*scaleTimeoutMap[testConfig.OSType]) defer cancel() // Create namespace if it doesn't exist