Merge pull request #120109 from Jefftree/fix-openapi-test-flakee

Add wait for cache sync to OpenAPI controller test
This commit is contained in:
Kubernetes Prow Robot 2023-08-23 10:39:47 -07:00 committed by GitHub
commit 7a38db6b97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -332,6 +332,7 @@ func setup(t *testing.T) (*testEnv, context.Context) {
ctx, cancel := context.WithCancel(context.Background())
factory.Start(ctx.Done())
factory.WaitForCacheSync(ctx.Done())
env.mux = http.NewServeMux()
h := handler.NewOpenAPIService(&spec.Swagger{})