mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
clientv3/integration: fix member remove
Do not connect to the member to remove.
This commit is contained in:
parent
83411b92b4
commit
c7876d4111
@ -67,7 +67,7 @@ func TestMemberRemove(t *testing.T) {
|
||||
clus := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 3})
|
||||
defer clus.Terminate(t)
|
||||
|
||||
capi := clientv3.NewCluster(clus.RandClient())
|
||||
capi := clientv3.NewCluster(clus.Client(1))
|
||||
resp, err := capi.MemberList(context.Background())
|
||||
if err != nil {
|
||||
t.Fatalf("failed to list member %v", err)
|
||||
|
@ -696,3 +696,7 @@ func (c *ClusterV3) Terminate(t *testing.T) {
|
||||
func (c *ClusterV3) RandClient() *clientv3.Client {
|
||||
return c.clients[rand.Intn(len(c.clients))]
|
||||
}
|
||||
|
||||
func (c *ClusterV3) Client(i int) *clientv3.Client {
|
||||
return c.clients[i]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user