Merge pull request #8795 from gyuho/balancer-timeout

clientv3/integration: increase balancer switch timeout for TestKVGetResetLoneEndpoint
This commit is contained in:
Gyu-Ho Lee 2017-10-31 13:09:28 -07:00 committed by GitHub
commit 4e2ef67f2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

1
.words
View File

@ -27,6 +27,7 @@ localhost
mutex
prefetching
protobuf
repin
serializable
teardown
too_many_pings

View File

@ -881,7 +881,11 @@ func TestKVGetResetLoneEndpoint(t *testing.T) {
// have Get try to reconnect
donec := make(chan struct{})
go func() {
ctx, cancel := context.WithTimeout(context.TODO(), 5*time.Second)
// 3-second is the minimum interval between endpoint being marked
// as unhealthy and being removed from unhealthy, so possibly
// takes >5-second to unpin and repin an endpoint
// TODO: decrease timeout when balancer switch rewrite
ctx, cancel := context.WithTimeout(context.TODO(), 7*time.Second)
if _, err := cli.Get(ctx, "abc", clientv3.WithSerializable()); err != nil {
t.Fatal(err)
}