fix: resolve goroutine leak in volumescheduling integration tests

Signed-off-by: kerthcet <kerthcet@gmail.com>
This commit is contained in:
kerthcet 2022-05-06 17:51:17 +08:00
parent b81a2a7373
commit 835cdd6d81

View File

@ -54,7 +54,7 @@ func setupClusterForVolumeCapacityPriority(t *testing.T, nsName string, resyncPe
if err != nil {
t.Fatalf("Failed to create PV controller: %v", err)
}
go ctrl.Run(context.TODO())
go ctrl.Run(textCtx.ctx)
// Start informer factory after all controllers are configured and running.
informerFactory.Start(textCtx.ctx.Done())