]> go.fuhry.dev Git - fsnotify.git/commitdiff
tests: Rename attribReceived to modifyReceived in TestFsnotifyAttrib
authorAdrien Bustany <adrien@bustany.org>
Thu, 16 Jan 2014 14:47:11 +0000 (15:47 +0100)
committerAdrien Bustany <adrien@bustany.org>
Thu, 16 Jan 2014 17:07:59 +0000 (18:07 +0100)
This counter is counting "IsModify" events.

fsnotify_test.go

index 9e39f0119c55c7875f3383dc492901bfbe62daab..8f1b1aebcdf10fc30aef5b9117ee1539dd0894d5 100644 (file)
@@ -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