Skip to content

Commit

Permalink
Merge pull request #8853 from gyuho/ttt
Browse files Browse the repository at this point in the history
clientv3/integration: remove TestKVGetOneEndpointDown
  • Loading branch information
gyuho authored Nov 10, 2017
2 parents dfe0f8c + 52f4bc9 commit 64acd71
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions clientv3/integration/kv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package integration
import (
"bytes"
"context"
"math/rand"
"os"
"reflect"
"strings"
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 64acd71

Please sign in to comment.