Merge pull request #4393 from xiang90/fix_test

clientv3/integration: fix member remove
This commit is contained in:
Xiang Li 2016-02-02 21:10:40 -08:00
commit cb30d6e6f8
2 changed files with 5 additions and 1 deletions

View File

@ -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)

View File

@ -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]
}