From afb0023ab38fac441e6c01160c695ffefe44456f Mon Sep 17 00:00:00 2001 From: Shihao Xia Date: Thu, 3 Jun 2021 21:45:48 -0400 Subject: [PATCH] fix potential deadlock --- .../serviceaccount/serviceaccounts_controller_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/serviceaccount/serviceaccounts_controller_test.go b/pkg/controller/serviceaccount/serviceaccounts_controller_test.go index a3e37f348ee..6ed9a842b7a 100644 --- a/pkg/controller/serviceaccount/serviceaccounts_controller_test.go +++ b/pkg/controller/serviceaccount/serviceaccounts_controller_test.go @@ -176,7 +176,7 @@ func TestServiceAccountCreation(t *testing.T) { saStore := saInformer.Informer().GetStore() nsStore := nsInformer.Informer().GetStore() - syncCalls := make(chan struct{}) + syncCalls := make(chan struct{}, 1) controller.syncHandler = func(ctx context.Context, key string) error { err := controller.syncNamespace(ctx, key) if err != nil {