From 9e1a2adf07cb58a0244d1aebf11da368750cd698 Mon Sep 17 00:00:00 2001 From: Hector Chu Date: Thu, 20 Oct 2011 08:10:58 +0100 Subject: [PATCH] exp/winfsnotify: fix test R=alex.brainman, mattn.jp CC=golang-dev https://golang.org/cl/5311047 --- src/pkg/exp/winfsnotify/winfsnotify_test.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/pkg/exp/winfsnotify/winfsnotify_test.go b/src/pkg/exp/winfsnotify/winfsnotify_test.go index edf2165c0ec..8c53fc8de13 100644 --- a/src/pkg/exp/winfsnotify/winfsnotify_test.go +++ b/src/pkg/exp/winfsnotify/winfsnotify_test.go @@ -70,15 +70,11 @@ func TestNotifyEvents(t *testing.T) { if _, err = file.WriteString("hello, world"); err != nil { t.Fatalf("failed to write to test file: %s", err) } - if err = file.Sync(); err != nil { - t.Fatalf("failed to sync test file: %s", err) - } - expect(t, watcher.Event, testFile, FS_MODIFY) - expect(t, watcher.Event, testFile, FS_MODIFY) - if err = file.Close(); err != nil { t.Fatalf("failed to close test file: %s", err) } + expect(t, watcher.Event, testFile, FS_MODIFY) + expect(t, watcher.Event, testFile, FS_MODIFY) if err = os.Rename(testFile, testFile2); err != nil { t.Fatalf("failed to rename test file: %s", err)