mirror of
https://github.com/restic/restic.git
synced 2024-12-23 16:26:11 +00:00
Retry umount for integration tests
This commit is contained in:
parent
9add72e9d6
commit
d4a2d70089
1 changed files with 12 additions and 1 deletions
|
@ -60,7 +60,18 @@ func mount(t testing.TB, global GlobalOptions, dir string) {
|
|||
|
||||
func umount(t testing.TB, global GlobalOptions, dir string) {
|
||||
cmd := &CmdMount{global: &global}
|
||||
OK(t, cmd.Umount(dir))
|
||||
|
||||
var err error
|
||||
for i := 0; i < mountWait; i++ {
|
||||
if err = cmd.Umount(dir); err == nil {
|
||||
t.Logf("directory %v umounted", dir)
|
||||
return
|
||||
}
|
||||
|
||||
time.Sleep(mountSleep)
|
||||
}
|
||||
|
||||
t.Errorf("unable to umount dir %v, last error was: %v", dir, err)
|
||||
}
|
||||
|
||||
func listSnapshots(t testing.TB, dir string) []string {
|
||||
|
|
Loading…
Reference in a new issue