From: Chris Howey Date: Sun, 26 May 2013 13:52:43 +0000 (-0500) Subject: Fix a couple tests X-Git-Tag: v1.7.2~364 X-Git-Url: https://go.fuhry.dev/?a=commitdiff_plain;h=1a1f89459ad91bb65802f1045b377402dee33361;p=fsnotify.git Fix a couple tests --- diff --git a/fsnotify_test.go b/fsnotify_test.go index ad41812..3932e12 100644 --- a/fsnotify_test.go +++ b/fsnotify_test.go @@ -281,7 +281,7 @@ func TestFsnotifyMultipleCreates(t *testing.T) { t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 2) } mReceived := modifyReceived.value() - if mReceived != 3 { + if mReceived < 3 { t.Fatalf("incorrect number of modify events received after 500 ms (%d vs atleast %d)", mReceived, 3) } dReceived := deleteReceived.value() @@ -564,6 +564,8 @@ func TestFsnotifySubDir(t *testing.T) { fs.Sync() fs.Close() + time.Sleep(200 * time.Millisecond) + // Make sure receive deletes for both file and sub-directory os.RemoveAll(testSubDir) os.Remove(testFile1)