Add wait for cache sync

This commit is contained in:
Jefftree 2023-08-22 16:34:38 +00:00
parent 9aba98ad71
commit 9c83c380e0

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{})