diff --git a/pkg/kubelet/pluginmanager/operationexecutor/operation_executor_test.go b/pkg/kubelet/pluginmanager/operationexecutor/operation_executor_test.go index f9e62c66ddc..2987d927d4b 100644 --- a/pkg/kubelet/pluginmanager/operationexecutor/operation_executor_test.go +++ b/pkg/kubelet/pluginmanager/operationexecutor/operation_executor_test.go @@ -185,6 +185,9 @@ func setup(t *testing.T) (context.Context, chan interface{}, chan interface{}, O // This function starts by writing to ch and blocks on the quit channel // until it is closed by the currently running test func startOperationAndBlock(ch chan<- interface{}, quit <-chan interface{}) { - ch <- nil - <-quit + select { + case ch <- nil: + <-quit + case <-quit: + } }