mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #4393 from xiang90/fix_test
clientv3/integration: fix member remove
This commit is contained in:
commit
cb30d6e6f8
@ -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)
|
||||
|
@ -697,3 +697,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