From 2c13231e7bb435ad0392d745d80f05134656df97 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Tue, 31 Oct 2017 10:33:57 -0700 Subject: [PATCH 1/2] clientv3/integration: increase balancer switch timeout for TestKVGetResetLoneEndpoint Since 3-second is the minimum time to keep an endpoint in unhealthy, it is possible that endpoint switch happens right after context timeout. Signed-off-by: Gyu-Ho Lee --- clientv3/integration/kv_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clientv3/integration/kv_test.go b/clientv3/integration/kv_test.go index c66fada80..b347d6c2b 100644 --- a/clientv3/integration/kv_test.go +++ b/clientv3/integration/kv_test.go @@ -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) } From 0f86f0e0e608078466167e704d6b58cd636da333 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Tue, 31 Oct 2017 11:05:26 -0700 Subject: [PATCH 2/2] words: whitelist more Signed-off-by: Gyu-Ho Lee --- .words | 1 + 1 file changed, 1 insertion(+) diff --git a/.words b/.words index f8673c99b..c839c1f35 100644 --- a/.words +++ b/.words @@ -27,6 +27,7 @@ localhost mutex prefetching protobuf +repin serializable teardown too_many_pings