From 989e791a42e9dedf7a39b17a877e08caa3a52866 Mon Sep 17 00:00:00 2001
From: lixiaobing10051267
Date: Mon, 26 Dec 2016 11:35:11 +0800
Subject: [PATCH] It is errNoSuchWatch not errNoSuchPoller in
filenotify/poller.go
Signed-off-by: lixiaobing10051267
---
pkg/filenotify/poller.go | 4 ++--
pkg/filenotify/poller_test.go | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pkg/filenotify/poller.go b/pkg/filenotify/poller.go
index dc5ccd0f7f..0f4c4dc7ba 100644
--- a/pkg/filenotify/poller.go
+++ b/pkg/filenotify/poller.go
@@ -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
diff --git a/pkg/filenotify/poller_test.go b/pkg/filenotify/poller_test.go
index b4c7825112..b74bd935a0 100644
--- a/pkg/filenotify/poller_test.go
+++ b/pkg/filenotify/poller_test.go
@@ -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)