clientv3/integration: remove TestKVGetOneEndpointDown

Already tested in other server shutdown tests.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyu-Ho Lee 2017-11-10 14:16:45 -08:00
parent dfe0f8c2bc
commit 52f4bc9061

View File

@ -17,7 +17,6 @@ package integration
import (
"bytes"
"context"
"math/rand"
"os"
"reflect"
"strings"
@ -825,35 +824,6 @@ func TestKVPutStoppedServerAndClose(t *testing.T) {
}
}
// TestKVGetOneEndpointDown ensures a client can connect and get if one endpoint is down.
func TestKVGetOneEndpointDown(t *testing.T) {
defer testutil.AfterTest(t)
clus := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 3, SkipCreatingClient: true})
defer clus.Terminate(t)
// get endpoint list
eps := make([]string, 3)
for i := range eps {
eps[i] = clus.Members[i].GRPCAddr()
}
// make a dead node
clus.Members[rand.Intn(len(eps))].Stop(t)
// try to connect with dead node in the endpoint list
cfg := clientv3.Config{Endpoints: eps, DialTimeout: 1 * time.Second}
cli, err := clientv3.New(cfg)
if err != nil {
t.Fatal(err)
}
defer cli.Close()
ctx, cancel := context.WithTimeout(context.TODO(), 3*time.Second)
if _, err := cli.Get(ctx, "abc", clientv3.WithSerializable()); err != nil {
t.Fatal(err)
}
cancel()
}
// TestKVGetResetLoneEndpoint ensures that if an endpoint resets and all other
// endpoints are down, then it will reconnect.
func TestKVGetResetLoneEndpoint(t *testing.T) {