Skip to content
Snippets Groups Projects
Commit bcac1db1 authored by 邹毅贤's avatar 邹毅贤
Browse files

add comment and test case

parent 267281aa
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,13 @@ func Test_UnRegister(t *testing.T) {
children, err = reg.client.GetChildren("/dubbo/com.ikurento.user.UserProvider/providers")
assert.Equal(t, 0, len(children))
assert.Error(t, err)
assert.True(t, reg.IsAvailable())
err = reg.Register(url)
children, _ = reg.client.GetChildren("/dubbo/com.ikurento.user.UserProvider/providers")
assert.Regexp(t, ".*dubbo%3A%2F%2F127.0.0.1%3A20000%2Fcom.ikurento.user.UserProvider%3Fanyhost%3Dtrue%26cluster%3Dmock%26.*.serviceid%3Dsoa.mock", children)
assert.NoError(t, err)
}
func Test_Subscribe(t *testing.T) {
......
......@@ -314,7 +314,7 @@ func (l *ZkEventListener) valid() bool {
return l.client.ZkConnValid()
}
// Close ...
// Close will let client listen exit
func (l *ZkEventListener) Close() {
close(l.client.exit)
l.wg.Wait()
......
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