mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #5949 from heyitsanthony/fix-functester-failfast
etcd-tester: add FailFast(false) to grpc calls
This commit is contained in:
commit
b50d2395fd
@ -25,6 +25,7 @@ import (
|
|||||||
|
|
||||||
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
|
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
|
||||||
"github.com/coreos/etcd/tools/functional-tester/etcd-agent/client"
|
"github.com/coreos/etcd/tools/functional-tester/etcd-agent/client"
|
||||||
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -263,7 +264,7 @@ func (c *cluster) compactKV(rev int64, timeout time.Duration) (err error) {
|
|||||||
kvc := pb.NewKVClient(conn)
|
kvc := pb.NewKVClient(conn)
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
||||||
plog.Printf("[compact kv #%d] starting (endpoint %s)", i, u)
|
plog.Printf("[compact kv #%d] starting (endpoint %s)", i, u)
|
||||||
_, cerr := kvc.Compact(ctx, &pb.CompactionRequest{Revision: rev, Physical: true})
|
_, cerr := kvc.Compact(ctx, &pb.CompactionRequest{Revision: rev, Physical: true}, grpc.FailFast(false))
|
||||||
cancel()
|
cancel()
|
||||||
conn.Close()
|
conn.Close()
|
||||||
succeed := true
|
succeed := true
|
||||||
|
@ -93,7 +93,7 @@ func (m *member) RevHash() (int64, int64, error) {
|
|||||||
}
|
}
|
||||||
mt := pb.NewMaintenanceClient(conn)
|
mt := pb.NewMaintenanceClient(conn)
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||||
resp, err := mt.Hash(ctx, &pb.HashRequest{})
|
resp, err := mt.Hash(ctx, &pb.HashRequest{}, grpc.FailFast(false))
|
||||||
cancel()
|
cancel()
|
||||||
conn.Close()
|
conn.Close()
|
||||||
|
|
||||||
|
@ -109,7 +109,8 @@ func (s *stresser) run(ctx context.Context, kvc pb.KVClient) {
|
|||||||
_, err := kvc.Put(putctx, &pb.PutRequest{
|
_, err := kvc.Put(putctx, &pb.PutRequest{
|
||||||
Key: []byte(fmt.Sprintf("foo%d", rand.Intn(s.KeySuffixRange))),
|
Key: []byte(fmt.Sprintf("foo%d", rand.Intn(s.KeySuffixRange))),
|
||||||
Value: []byte(randStr(s.KeySize)),
|
Value: []byte(randStr(s.KeySize)),
|
||||||
})
|
},
|
||||||
|
grpc.FailFast(false))
|
||||||
putcancel()
|
putcancel()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
shouldContinue := false
|
shouldContinue := false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user