Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readdcw: Fix unwatching at the same time as incoming event #126

Closed
wants to merge 12 commits into from
Prev Previous commit
Next Next commit
fix
  • Loading branch information
imsodin committed Aug 27, 2017
commit e501009c1e545e63a29eeb668e868a9e826e1fbe
9 changes: 7 additions & 2 deletions watcher_readdcw_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@

package notify

import "testing"
import (
"filepath"
"os"
"testing"
"time"
)

// TODO(ppknap) : remove notify.Create event.
func rcreate(w *W, path string) WCase {
Expand Down Expand Up @@ -70,7 +75,7 @@ func TestWatcherReaddcwUnwatchChangeRace(t *testing.T) {
w := NewWatcherTest(t, "testdata/vfs.txt", All)
defer w.Close()

triggerFile = filepath.Join(w.root, "trigger")
triggerFile := filepath.Join(w.root, "trigger")
os.Create(triggerFile)
time.Sleep(time.Duration(100) * time.Millisecond)

Expand Down