Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
cvvz committed Mar 22, 2023
1 parent 67440cd commit 114cdaf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/blob/nodeserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe

// wait a few seconds to make sure blobfuse mount is successful
// please refer to https://github.com/Azure/azure-storage-fuse/pull/1088 for more details
if err := waitForMount(targetPath, waitForMountInterval, waitForMountTimeout); err != nil {
if err := d.waitForMount(targetPath, waitForMountInterval, waitForMountTimeout); err != nil {
return nil, fmt.Errorf("failed to wait for mount: %w", err)
}

Expand Down Expand Up @@ -583,14 +583,14 @@ func (d *Driver) ensureMountPoint(target string, perm os.FileMode) (bool, error)
return !notMnt, nil
}

func waitForMount(path string, intervel, timeout time.Duration) error {
func (d *Driver) waitForMount(path string, intervel, timeout time.Duration) error {
timeAfter := time.After(timeout)
timeTick := time.Tick(intervel)

for {
select {
case <-timeTick:
notMount, err := mount.New("").IsLikelyNotMountPoint(path)
notMount, err := d.mounter.IsLikelyNotMountPoint(path)
if err != nil {
return err
}
Expand Down

0 comments on commit 114cdaf

Please sign in to comment.