mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-10 12:32:03 +00:00
Merge pull request #120109 from Jefftree/fix-openapi-test-flakee
Add wait for cache sync to OpenAPI controller test
This commit is contained in:
commit
7a38db6b97
@ -332,6 +332,7 @@ func setup(t *testing.T) (*testEnv, context.Context) {
|
|||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
|
|
||||||
factory.Start(ctx.Done())
|
factory.Start(ctx.Done())
|
||||||
|
factory.WaitForCacheSync(ctx.Done())
|
||||||
|
|
||||||
env.mux = http.NewServeMux()
|
env.mux = http.NewServeMux()
|
||||||
h := handler.NewOpenAPIService(&spec.Swagger{})
|
h := handler.NewOpenAPIService(&spec.Swagger{})
|
||||||
|
Loading…
Reference in New Issue
Block a user