registry/memory: watcher bug fixes (#1740)
* registry/memory: watcher bugfixes * registry/memory: fix nil watcher bug * registry/memory: fix watcher test
This commit is contained in:
@@ -11,10 +11,15 @@ func TestWatcher(t *testing.T) {
|
||||
id: "test",
|
||||
res: make(chan *registry.Result),
|
||||
exit: make(chan bool),
|
||||
wo: registry.WatchOptions{
|
||||
Domain: registry.WildcardDomain,
|
||||
},
|
||||
}
|
||||
|
||||
go func() {
|
||||
w.res <- ®istry.Result{}
|
||||
w.res <- ®istry.Result{
|
||||
Service: ®istry.Service{Name: "foo"},
|
||||
}
|
||||
}()
|
||||
|
||||
_, err := w.Next()
|
||||
|
||||
Reference in New Issue
Block a user