From 9d271522927a8850bca29e0248ce7f92f8725609 Mon Sep 17 00:00:00 2001 From: Martin Bertschler Date: Thu, 7 Jan 2016 11:52:33 +0100 Subject: [PATCH 1/2] try to speed up test on unix systems --- memmap_test.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/memmap_test.go b/memmap_test.go index f090df7..43478e4 100644 --- a/memmap_test.go +++ b/memmap_test.go @@ -3,6 +3,7 @@ package afero import ( "os" "path/filepath" + "runtime" "testing" "time" ) @@ -232,9 +233,14 @@ func TestWriteCloseTime(t *testing.T) { t.Error(fs.Name()+":", "Stat failed: "+err.Error()) } timeBefore := fi.ModTime() - // sorry for the delay, but we have to make sure time advances, also - // on non Un*x systems... - time.Sleep(2 * time.Second) + + if runtime.GOOS == "windows" { + // sorry for the delay, but we have to make sure time advances, + // also on non Un*x systems... + time.Sleep(2 * time.Second) + } else { + time.Sleep(10 * time.Millisecond) + } _, err = f.Write([]byte("test")) if err != nil { From a19c2e3d704d52efa98f1ab7964187614026a3c0 Mon Sep 17 00:00:00 2001 From: Martin Bertschler Date: Thu, 7 Jan 2016 11:58:02 +0100 Subject: [PATCH 2/2] make test output verbose on travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2fb68ca..4fbf875 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,5 +2,5 @@ language: go go: - tip script: - - go test ./... + - go test -v ./... - go build