From 300870a2d564c63ad398cfd4fba23459c17e3ca2 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Mon, 11 Jan 2016 13:42:25 -0500 Subject: [PATCH] pausing during modtime test so darwin passes --- memmap_test.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/memmap_test.go b/memmap_test.go index 43478e4..bb2769b 100644 --- a/memmap_test.go +++ b/memmap_test.go @@ -234,11 +234,14 @@ func TestWriteCloseTime(t *testing.T) { } timeBefore := fi.ModTime() - if runtime.GOOS == "windows" { - // sorry for the delay, but we have to make sure time advances, - // also on non Un*x systems... + // sorry for the delay, but we have to make sure time advances, + // also on non Un*x systems... + switch runtime.GOOS { + case "windows": time.Sleep(2 * time.Second) - } else { + case "darwin": + time.Sleep(1 * time.Second) + default: time.Sleep(10 * time.Millisecond) }