From b4e3f272b90d485541d371138471aee55bde2a63 Mon Sep 17 00:00:00 2001 From: Chris Henzie Date: Mon, 28 Dec 2020 11:52:32 -0800 Subject: [PATCH] Remove unused waitSleepTime field in csiAttacher --- pkg/volume/csi/csi_attacher.go | 5 ++--- pkg/volume/csi/csi_attacher_test.go | 1 - pkg/volume/csi/csi_plugin.go | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/pkg/volume/csi/csi_attacher.go b/pkg/volume/csi/csi_attacher.go index 18c6c0a7899..6617a6423e4 100644 --- a/pkg/volume/csi/csi_attacher.go +++ b/pkg/volume/csi/csi_attacher.go @@ -46,9 +46,8 @@ const ( ) type csiAttacher struct { - plugin *csiPlugin - k8s kubernetes.Interface - waitSleepTime time.Duration + plugin *csiPlugin + k8s kubernetes.Interface csiClient csiClient } diff --git a/pkg/volume/csi/csi_attacher_test.go b/pkg/volume/csi/csi_attacher_test.go index 5e45f87c2a0..615a7e6f732 100644 --- a/pkg/volume/csi/csi_attacher_test.go +++ b/pkg/volume/csi/csi_attacher_test.go @@ -990,7 +990,6 @@ func TestAttacherDetach(t *testing.T) { t.Errorf("test case %s failed: %v", tc.name, err) } watchError := tc.watcherError - csiAttacher.waitSleepTime = 100 * time.Millisecond go func() { if watchError { errStatus := apierrors.NewInternalError(fmt.Errorf("we got an error")).Status() diff --git a/pkg/volume/csi/csi_plugin.go b/pkg/volume/csi/csi_plugin.go index 77826866dbf..0102f9e3213 100644 --- a/pkg/volume/csi/csi_plugin.go +++ b/pkg/volume/csi/csi_plugin.go @@ -944,9 +944,8 @@ func (p *csiPlugin) newAttacherDetacher() (*csiAttacher, error) { } return &csiAttacher{ - plugin: p, - k8s: k8s, - waitSleepTime: 1 * time.Second, + plugin: p, + k8s: k8s, }, nil }