@@ -48,14 +48,14 @@ import (
48
48
const (
49
49
// reconcilerLoopSleepDuration is the amount of time the reconciler loop
50
50
// waits between successive executions
51
- reconcilerLoopSleepDuration time. Duration = 1 * time .Nanosecond
51
+ reconcilerLoopSleepDuration = 1 * time .Nanosecond
52
52
// waitForAttachTimeout is the maximum amount of time a
53
53
// operationexecutor.Mount call will wait for a volume to be attached.
54
- waitForAttachTimeout time. Duration = 1 * time .Second
55
- nodeName k8stypes. NodeName = k8stypes .NodeName ("mynodename" )
56
- kubeletPodsDir string = "fake-dir"
57
- testOperationBackOffDuration time. Duration = 100 * time .Millisecond
58
- reconcilerSyncWaitDuration time. Duration = 10 * time .Second
54
+ waitForAttachTimeout = 1 * time .Second
55
+ nodeName = k8stypes .NodeName ("mynodename" )
56
+ kubeletPodsDir = "fake-dir"
57
+ testOperationBackOffDuration = 100 * time .Millisecond
58
+ reconcilerSyncWaitDuration = 10 * time .Second
59
59
)
60
60
61
61
func hasAddedPods () bool { return true }
@@ -1791,6 +1791,7 @@ func Test_Run_Positive_VolumeMountControllerAttachEnabledRace(t *testing.T) {
1791
1791
<- stoppedChan
1792
1792
1793
1793
finished := make (chan interface {})
1794
+ fakePlugin .Lock ()
1794
1795
fakePlugin .UnmountDeviceHook = func (mountPath string ) error {
1795
1796
// Act:
1796
1797
// 3. While a volume is being unmounted, add it back to the desired state of world
@@ -1812,6 +1813,7 @@ func Test_Run_Positive_VolumeMountControllerAttachEnabledRace(t *testing.T) {
1812
1813
close (finished )
1813
1814
return devicePath , nil
1814
1815
}
1816
+ fakePlugin .Unlock ()
1815
1817
1816
1818
// Start the reconciler again.
1817
1819
go reconciler .Run (wait .NeverStop )
0 commit comments