Skip to content
Snippets Groups Projects
Commit f5030fe5 authored by 李志信's avatar 李志信
Browse files

fix: fix test and add another gr to push notify

parent 4bce4312
No related branches found
No related tags found
No related merge requests found
......@@ -104,7 +104,9 @@ func (c *RouterChain) AddRouters(routers []router.PriorityRouter) {
c.mutex.Lock()
defer c.mutex.Unlock()
c.routers = newRouters
c.notify <- struct{}{}
go func() {
c.notify <- struct{}{}
}()
}
// SetInvokers receives updated invokers from registry center. If the times of notification exceeds countThreshold and
......
......@@ -143,6 +143,11 @@ conditions:
assert.NotNil(t, url)
factory := extension.GetRouterFactory(url.Protocol)
notify := make(chan struct{})
go func() {
for {
<-notify
}
}()
r, err := factory.NewPriorityRouter(url, notify)
assert.Nil(t, err)
assert.NotNil(t, r)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment