Skip to content

Commit 90aab8e

Browse files
committed
add custom timeout for cloning
1 parent 58737f0 commit 90aab8e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/k8s-integration/driver-config.go

+12
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,18 @@ type driverConfig struct {
1717
SupportedFsType []string
1818
MinimumVolumeSize string
1919
NumAllowedTopologies int
20+
Timeouts map[string]string
2021
}
2122

2223
const (
2324
testConfigDir = "test/k8s-integration/config"
2425
configTemplateFile = "test-config-template.in"
2526
configFile = "test-config.yaml"
27+
// configurable timeouts for the k8s e2e testsuites.
28+
dataSourceProvisionTimeout = "480s"
29+
30+
// These are keys for the configurable timeout map.
31+
dataSourceProvisionTimeoutKey = "DataSourceProvision"
2632
)
2733

2834
// generateDriverConfigFile loads a testdriver config template and creates a file
@@ -123,6 +129,11 @@ func generateDriverConfigFile(testParams *testParameters, storageClassFile strin
123129
minimumVolumeSize = "200Gi"
124130
numAllowedTopologies = 2
125131
}
132+
// GCE PD CSI Driver takes in the order of minutes to provision storage with a pvc data source provisioned,
133+
// and with dynamic provisioning (WaitForFirstCustomer policy), some e2e tests need a longer pod start timeout.
134+
timeouts := map[string]string{
135+
dataSourceProvisionTimeoutKey: dataSourceProvisionTimeout,
136+
}
126137
params := driverConfig{
127138
StorageClassFile: filepath.Join(testParams.pkgDir, testConfigDir, storageClassFile),
128139
StorageClass: storageClassFile[:strings.LastIndex(storageClassFile, ".")],
@@ -131,6 +142,7 @@ func generateDriverConfigFile(testParams *testParameters, storageClassFile strin
131142
Capabilities: caps,
132143
MinimumVolumeSize: minimumVolumeSize,
133144
NumAllowedTopologies: numAllowedTopologies,
145+
Timeouts: timeouts,
134146
}
135147

136148
// Write config file

0 commit comments

Comments
 (0)