Skip to content

Commit

Permalink
add retry times in zookeeper starting (#1179)
Browse files Browse the repository at this point in the history
* add retry times

* Add: add ruubypay to user list. (#1180)

* fix import for linter

* replace default config string with const value (#1182)

* replace default config string with const value

* delete some duplicate keys

Co-authored-by: dongjianhui <dongjianhui@yuanfudao.com>

* Fix 3.0 ci problem (#1188)

* fix etcd problem

* fix metadata report etcd problem

* fix nacos & cluster_impl ci problem

* fix nacos ci problem

* fix zk ci problem

* fix zk metadata service urls not found error

* fix zk TestAddListenerZookeeperServiceDiscovery

* fix zk TestAddListenerZookeeperServiceDiscovery

* fix config int to string bug

* add retry times

* fix import for linter

* revert rename etcdv3

Co-authored-by: xianlezheng <zhengxianle@gmail.com>
Co-authored-by: Mulavar <978007503@qq.com>
Co-authored-by: dongjianhui <dongjianhui@yuanfudao.com>
Co-authored-by: randy <ztelur@gmail.com>
Co-authored-by: 蒋超 <jiangchao@jiangchaodeMacBook-Pro.local>
  • Loading branch information
6 people committed May 7, 2021
1 parent 3180469 commit f421172
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config_center/zookeeper/impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const (
)

func initZkData(group string, t *testing.T) (*zk.TestCluster, *zookeeperDynamicConfiguration) {
ts, err := zk.StartTestCluster(1, nil, nil)
ts, err := zk.StartTestCluster(1, nil, nil, zk.WithRetryTimes(20))
assert.NoError(t, err)
assert.NotNil(t, ts.Servers[0])
urlString := "registry://127.0.0.1:" + strconv.Itoa(ts.Servers[0].Port)
Expand Down
2 changes: 1 addition & 1 deletion config_center/zookeeper/listener_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
)

func initZkDynamicConfiguration(t *testing.T) (*zk.TestCluster, *zookeeperDynamicConfiguration) {
ts, err := zk.StartTestCluster(1, nil, nil)
ts, err := zk.StartTestCluster(1, nil, nil, zk.WithRetryTimes(20))
assert.NoError(t, err)
assert.NotNil(t, ts.Servers[0])
urlString := "registry://127.0.0.1:" + strconv.Itoa(ts.Servers[0].Port)
Expand Down
2 changes: 1 addition & 1 deletion metadata/report/zookeeper/report_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (suite *zookeeperMetadataReportTestSuite) testGetServiceDefinition() {
}

func test1(t *testing.T) {
testCluster, err := zk.StartTestCluster(1, nil, nil)
testCluster, err := zk.StartTestCluster(1, nil, nil, zk.WithRetryTimes(20))
assert.NoError(t, err)
defer func() {
err := testCluster.Stop()
Expand Down
2 changes: 1 addition & 1 deletion registry/zookeeper/service_discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var tc *zk.TestCluster

func prepareData(t *testing.T) *zk.TestCluster {
var err error
tc, err = zk.StartTestCluster(1, nil, nil)
tc, err = zk.StartTestCluster(1, nil, nil, zk.WithRetryTimes(20))
assert.NoError(t, err)
assert.NotNil(t, tc.Servers[0])
address := "127.0.0.1:" + strconv.Itoa(tc.Servers[0].Port)
Expand Down

0 comments on commit f421172

Please sign in to comment.