From: Adrien Bustany Date: Thu, 16 Jan 2014 14:47:11 +0000 (+0100) Subject: tests: Rename attribReceived to modifyReceived in TestFsnotifyAttrib X-Git-Tag: v1.7.2~327^2~2 X-Git-Url: https://go.fuhry.dev/?a=commitdiff_plain;h=b0425e07b77bd0377c0b1c1248f7ad8233679f89;p=fsnotify.git tests: Rename attribReceived to modifyReceived in TestFsnotifyAttrib This counter is counting "IsModify" events. --- diff --git a/fsnotify_test.go b/fsnotify_test.go index 9e39f01..8f1b1ae 100644 --- a/fsnotify_test.go +++ b/fsnotify_test.go @@ -983,14 +983,14 @@ func TestFsnotifyAttrib(t *testing.T) { // Receive events on the event channel on a separate goroutine eventstream := watcher.Event - var attribReceived counter + var modifyReceived counter done := make(chan bool) go func() { for event := range eventstream { // Only count relevant events if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) { if event.IsModify() { - attribReceived.increment() + modifyReceived.increment() } t.Logf("event received: %s", event) } else { @@ -1026,8 +1026,8 @@ func TestFsnotifyAttrib(t *testing.T) { // We expect this event to be received almost immediately, but let's wait 500 ms to be sure time.Sleep(500 * time.Millisecond) - if attribReceived.value() == 0 { - t.Fatal("fsnotify attribute events have not received after 500 ms") + if modifyReceived.value() == 0 { + t.Fatal("fsnotify modify events have not received after 500 ms") } // Try closing the fsnotify instance