mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #125993 from macsko/increase_server_timeout_in_scheduler_perf_tests
Increase API server timeout in scheduler_perf integration tests
This commit is contained in:
commit
5f7cfdef11
@ -104,6 +104,8 @@ type TestServerInstanceOptions struct {
|
||||
// Set the BinaryVersion of server effective version.
|
||||
// Default to 1.31
|
||||
BinaryVersion string
|
||||
// Set non-default request timeout in the server.
|
||||
RequestTimeout time.Duration
|
||||
}
|
||||
|
||||
// TestServer return values supplied by kube-test-ApiServer
|
||||
@ -194,6 +196,9 @@ func StartTestServer(t ktesting.TB, instanceOptions *TestServerInstanceOptions,
|
||||
utilruntime.Must(utilversion.DefaultComponentGlobalsRegistry.Register(utilversion.DefaultKubeComponent, effectiveVersion, featureGate))
|
||||
|
||||
s := options.NewServerRunOptions()
|
||||
if instanceOptions.RequestTimeout > 0 {
|
||||
s.GenericServerRunOptions.RequestTimeout = instanceOptions.RequestTimeout
|
||||
}
|
||||
|
||||
for _, f := range s.Flags().FlagSets {
|
||||
fs.AddFlagSet(f)
|
||||
|
@ -94,7 +94,10 @@ func mustSetupCluster(tCtx ktesting.TContext, config *config.KubeSchedulerConfig
|
||||
"--disable-admission-plugins=ServiceAccount,TaintNodesByCondition,Priority",
|
||||
"--runtime-config=" + strings.Join(runtimeConfig, ","),
|
||||
}
|
||||
server, err := apiservertesting.StartTestServer(tCtx, apiservertesting.NewDefaultTestServerOptions(), customFlags, framework.SharedEtcd())
|
||||
serverOpts := apiservertesting.NewDefaultTestServerOptions()
|
||||
// Timeout sufficiently long to handle deleting pods of the largest test cases.
|
||||
serverOpts.RequestTimeout = 10 * time.Minute
|
||||
server, err := apiservertesting.StartTestServer(tCtx, serverOpts, customFlags, framework.SharedEtcd())
|
||||
if err != nil {
|
||||
tCtx.Fatalf("start apiserver: %v", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user