aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_helpers/mount_unmount.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_helpers/mount_unmount.go b/tests/test_helpers/mount_unmount.go
index 7b5dafa..753ae1a 100644
--- a/tests/test_helpers/mount_unmount.go
+++ b/tests/test_helpers/mount_unmount.go
@@ -126,7 +126,13 @@ func UnmountPanic(dir string) {
cmd := exec.Command("lsof", dir)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
- cmd.Run()
+ cmd.Start()
+ timer := time.AfterFunc(1*time.Second, func() {
+ fmt.Printf("timeout!")
+ cmd.Process.Kill()
+ })
+ cmd.Wait()
+ timer.Stop()
panic("UnmountPanic: unmount failed: " + err.Error())
}
}