This is an automated email from the ASF dual-hosted git repository.
laurence pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
The following commit(s) were added to refs/heads/3.0 by this push:
new 92df41c fix: mock zk registry (#1351)
92df41c is described below
commit 92df41cfde9727756e9bc6e5b11e49fe0b649d24
Author: Laurence <[email protected]>
AuthorDate: Fri Jul 30 09:40:23 2021 +0800
fix: mock zk registry (#1351)
---
.gitignore | 1 +
registry/zookeeper/registry.go | 1 +
2 files changed, 2 insertions(+)
diff --git a/.gitignore b/.gitignore
index 135b147..25cf086 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@
*.so
*.dylib
*.jar
+*.log
# Test binary, build with `go test -c`
*.test
diff --git a/registry/zookeeper/registry.go b/registry/zookeeper/registry.go
index ea7e342..87726e8 100644
--- a/registry/zookeeper/registry.go
+++ b/registry/zookeeper/registry.go
@@ -108,6 +108,7 @@ func newMockZkRegistry(url *common.URL, opts
...gxzookeeper.Option) (*zk.TestClu
if err != nil {
return nil, nil, err
}
+ r.WaitGroup().Add(1)
go zookeeper.HandleClientRestart(r)
r.InitListeners()
return c, r, nil