Merge pull request #29694 from lixiaobing10051267/masterFileNodify2

It is errNoSuchWatch not errNoSuchPoller in filenotify/poller.go
Upstream-commit: e3f61bd254071fc410fbd343bb103ab4ffef040c
Component: engine
This commit is contained in:
Alexander Morozov
2016-12-27 09:04:34 -08:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@ -15,8 +15,8 @@ import (
var (
// errPollerClosed is returned when the poller is closed
errPollerClosed = errors.New("poller is closed")
// errNoSuchPoller is returned when trying to remove a watch that doesn't exist
errNoSuchWatch = errors.New("poller does not exist")
// errNoSuchWatch is returned when trying to remove a watch that doesn't exist
errNoSuchWatch = errors.New("watch does not exist")
)
// watchWaitTime is the time to wait between file poll loops

View File

@ -108,7 +108,7 @@ func assertEvent(w FileWatcher, eType fsnotify.Op) error {
select {
case e := <-w.Events():
if e.Op != eType {
err = fmt.Errorf("got wrong event type, expected %q: %v", eType, e)
err = fmt.Errorf("got wrong event type, expected %q: %v", eType, e.Op)
}
case e := <-w.Errors():
err = fmt.Errorf("got unexpected error waiting for events %v: %v", eType, e)