Stop leaking apiserver in tracing test

This commit is contained in:
Wojciech Tyczyński 2022-05-13 09:31:25 +02:00
parent dd1a7893d4
commit 89549142c0

View File

@ -74,13 +74,12 @@ endpoint: %s`, listener.Addr().String())), os.FileMode(0755)); err != nil {
}
// Start the API Server with our tracing configuration
stopCh := make(chan struct{})
defer close(stopCh)
testServer := kubeapiservertesting.StartTestServerOrDie(t,
kubeapiservertesting.NewDefaultTestServerOptions(),
[]string{"--tracing-config-file=" + tracingConfigFile.Name()},
framework.SharedEtcd(),
)
defer testServer.TearDownFn()
clientConfig := testServer.ClientConfig
// Create a client that creates sampled traces.