From 623e10ab1f39c37f5fe6e3cbc535a1fce6847439 Mon Sep 17 00:00:00 2001 From: niuyueyang <719415781@qq.com> Date: Thu, 16 Mar 2023 12:41:31 +0800 Subject: [PATCH] sort remove pod with usage --- pkg/descheduler/descheduler_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/descheduler/descheduler_test.go b/pkg/descheduler/descheduler_test.go index 7987fb3cf4..f77b127081 100644 --- a/pkg/descheduler/descheduler_test.go +++ b/pkg/descheduler/descheduler_test.go @@ -150,7 +150,8 @@ func TestRealUtiization(t *testing.T) { internalDeschedulerPolicy := &api.DeschedulerPolicy{} scope := scope{} - ctx, _ := context.WithTimeout(context.Background(), time.Second*10) + ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) + defer cancel() err = v1alpha1.V1alpha1ToInternal(dp, pluginregistry.PluginRegistry, internalDeschedulerPolicy, scope) if err != nil { t.Fatalf("Unable to convert v1alpha1 to v1alpha2: %v", err)