aboutsummaryrefslogtreecommitdiff
path: root/tests/defaults/ctlsock_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2019-01-02 01:09:09 +0100
committerJakob Unterwurzacher2019-01-02 01:09:09 +0100
commit772afa93f98aa77959995e42564b898057c59b87 (patch)
tree974b667fb481b87ef4ea6f2375d2dc7c48fd12fe /tests/defaults/ctlsock_test.go
parent5aa1755cbc55d17a5b4b71faa1e0bba34fe83d8b (diff)
tests: add fd leak retry logic to UnmountErr, really return error
Give the gocryptfs process one extra millisecond to close files. Allows us to drop several other sleeps. UnmountErr now really returns an error when it detects an fd leak instead of just printing a message.
Diffstat (limited to 'tests/defaults/ctlsock_test.go')
-rw-r--r--tests/defaults/ctlsock_test.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/tests/defaults/ctlsock_test.go b/tests/defaults/ctlsock_test.go
index 212ded4..b987bf6 100644
--- a/tests/defaults/ctlsock_test.go
+++ b/tests/defaults/ctlsock_test.go
@@ -4,7 +4,6 @@ import (
"os"
"syscall"
"testing"
- "time"
"github.com/rfjakob/gocryptfs/internal/ctlsock"
"github.com/rfjakob/gocryptfs/tests/test_helpers"
@@ -38,9 +37,6 @@ func TestCtlSock(t *testing.T) {
t.Errorf("We should get a warning about non-canonical paths here")
}
}
- // Give the running gocryptfs process a little bit of time to close lingering
- // sockets. Avoid triggering the FD leak detector.
- time.Sleep(1 * time.Millisecond)
}
func TestCtlSockDecrypt(t *testing.T) {
@@ -91,9 +87,6 @@ func TestCtlSockDecrypt(t *testing.T) {
t.Errorf("want=%q got=%q", p, response.Result)
}
}
- // Give the running gocryptfs process a little bit of time to close lingering
- // sockets. Avoid triggering the FD leak detector.
- time.Sleep(1 * time.Millisecond)
}
func TestCtlSockDecryptCrash(t *testing.T) {