mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 02:34:03 +00:00
Merge pull request #125518 from pohly/scheduler-perf-cleanup-fix
scheduler_perf: shut down apiserver clients before apiserver
This commit is contained in:
commit
0fd6746b2a
@ -98,11 +98,10 @@ func mustSetupCluster(tCtx ktesting.TContext, config *config.KubeSchedulerConfig
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
tCtx.Fatalf("start apiserver: %v", err)
|
tCtx.Fatalf("start apiserver: %v", err)
|
||||||
}
|
}
|
||||||
|
// Cleanup will be in reverse order: first the clients by canceling the
|
||||||
|
// child context (happens automatically), then the server.
|
||||||
tCtx.Cleanup(server.TearDownFn)
|
tCtx.Cleanup(server.TearDownFn)
|
||||||
|
tCtx = ktesting.WithCancel(tCtx)
|
||||||
// Cleanup will be in reverse order: first the clients get cancelled,
|
|
||||||
// then the apiserver is torn down via the automatic cancelation of
|
|
||||||
// tCtx.
|
|
||||||
|
|
||||||
// TODO: client connection configuration, such as QPS or Burst is configurable in theory, this could be derived from the `config`, need to
|
// TODO: client connection configuration, such as QPS or Burst is configurable in theory, this could be derived from the `config`, need to
|
||||||
// support this when there is any testcase that depends on such configuration.
|
// support this when there is any testcase that depends on such configuration.
|
||||||
|
Loading…
Reference in New Issue
Block a user