From cabd9fc6d61d6ebd1354278c920947e34308efa0 Mon Sep 17 00:00:00 2001 From: "scott.wang" <sxllwx@github.com> Date: Thu, 1 Aug 2019 14:42:06 +0800 Subject: [PATCH] Fix etcd remoting etcd endpionts --- remoting/etcdv3/client_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/remoting/etcdv3/client_test.go b/remoting/etcdv3/client_test.go index afbee5f37..c4e4e904b 100644 --- a/remoting/etcdv3/client_test.go +++ b/remoting/etcdv3/client_test.go @@ -3,6 +3,7 @@ package etcdv3 import ( "fmt" "go.etcd.io/etcd/embed" + "net/url" "path" "reflect" "strings" @@ -65,7 +66,13 @@ func (suite *ClientTestSuite) SetupSuite() { t := suite.T() + DefaultListenPeerURLs := "http://localhost:2382" + DefaultListenClientURLs := "http://localhost:2381" + lpurl, _ := url.Parse(DefaultListenPeerURLs) + lcurl, _ := url.Parse(DefaultListenClientURLs) cfg := embed.NewConfig() + cfg.LPUrls = []url.URL{*lpurl} + cfg.LCUrls = []url.URL{*lcurl} cfg.Dir = "/tmp/default.etcd" e, err := embed.StartEtcd(cfg) if err != nil { @@ -350,7 +357,7 @@ func TestClientSuite(t *testing.T) { heartbeat int }{ name: "test", - endpoints: []string{"localhost:2379"}, + endpoints: []string{"localhost:2381"}, timeout: time.Second, heartbeat: 1, }, -- GitLab