Skip to content

Commit

Permalink
use zap as logger in test because capsnlog has a race error
Browse files Browse the repository at this point in the history
  • Loading branch information
JackyChiu committed Mar 23, 2020
1 parent 25efea5 commit 47a5777
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cluster/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ func (suite *ClusterSuite) TestMemberAdd() {
}
memberCfg.etcdConfig.Name = "node2"
memberCfg.etcdConfig.Dir = "tmp2"
memberCfg.etcdConfig.Logger = "zap"
memberCfg.etcdConfig.LPUrls = []url.URL{*LPUrl}
memberCfg.etcdConfig.LCUrls = []url.URL{*LCUrl}
memberCfg.etcdConfig.APUrls = []url.URL{*LPUrl}
Expand Down Expand Up @@ -114,6 +115,7 @@ func (suite *ClusterSuite) TestMemberAdd() {
}
memberCfg.etcdConfig.Name = "node3"
memberCfg.etcdConfig.Dir = "tmp3"
memberCfg.etcdConfig.Logger = "zap"
memberCfg.etcdConfig.LPUrls = []url.URL{*LPUrl, *LPUrl2}
memberCfg.etcdConfig.LCUrls = []url.URL{*LCUrl, *LCUrl2}
memberCfg.etcdConfig.APUrls = []url.URL{*LPUrl, *LPUrl2}
Expand Down Expand Up @@ -144,6 +146,7 @@ func (suite *ClusterSuite) TestMemberAdd() {
}
memberCfg.etcdConfig.Name = "node4"
memberCfg.etcdConfig.Dir = "tmp4"
memberCfg.etcdConfig.Logger = "zap"
memberCfg.etcdConfig.LPUrls = []url.URL{*LPUrl}
memberCfg.etcdConfig.LCUrls = []url.URL{*LCUrl}
memberCfg.etcdConfig.APUrls = []url.URL{*LPUrl}
Expand Down
1 change: 1 addition & 0 deletions cluster/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ func (suite *EtcdDependentSuite) TestEtcdRegistry_nodes() {

func startTestEtcd() ([]string, func()) {
cfg := embed.NewConfig()
cfg.Logger = "zap"

tmp, err := ioutil.TempDir("", "test_etcd")
cfg.Dir = tmp
Expand Down
2 changes: 2 additions & 0 deletions cluster/testdata/node1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ initial-cluster-token: 'etcd-cluster'
initial-cluster-state: 'new'

strict-reconfig-check: false

logger: 'zap'

0 comments on commit 47a5777

Please sign in to comment.