mirror of
https://github.com/rclone/rclone.git
synced 2024-11-29 03:48:27 +08:00
mount test: retry umount as it fails occasionally
This is because of the background releasing of files which happens after all the files are closed.
This commit is contained in:
parent
2ca477c57f
commit
28fcc53e45
|
@ -13,6 +13,7 @@ import (
|
|||
"runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/ncw/rclone/cmd/mountlib"
|
||||
"github.com/ncw/rclone/fs"
|
||||
|
@ -156,6 +157,11 @@ func (r *Run) umount() {
|
|||
*/
|
||||
log.Printf("Unmounting %q", r.mountPath)
|
||||
err := r.umountFn()
|
||||
if err != nil {
|
||||
log.Printf("signal to umount failed - retrying: %v", err)
|
||||
time.Sleep(3 * time.Second)
|
||||
err = r.umountFn()
|
||||
}
|
||||
if err != nil {
|
||||
log.Fatalf("signal to umount failed: %v", err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user