From 87e3de8b8b39aacd7051c7fbf0724bd7f9c547f9 Mon Sep 17 00:00:00 2001 From: Yicheng Qin Date: Sat, 21 Feb 2015 18:18:57 -0800 Subject: [PATCH] integration: fix decrease cluster tests --- integration/cluster_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/integration/cluster_test.go b/integration/cluster_test.go index 60e1a1995..ca58e2d9a 100644 --- a/integration/cluster_test.go +++ b/integration/cluster_test.go @@ -346,8 +346,10 @@ func (c *cluster) RemoveMember(t *testing.T, id uint64) { select { case <-m.s.StopNotify(): m.Terminate(t) - // 1s stop delay + election timeout + 1s disk and network delay - case <-time.After(time.Second + time.Duration(electionTicks)*tickDuration + time.Second): + // 1s stop delay + election timeout + 1s disk and network delay + connection write timeout + // TODO: remove connection write timeout by selecting on http response closeNotifier + // blocking on https://github.com/golang/go/issues/9524 + case <-time.After(time.Second + time.Duration(electionTicks)*tickDuration + time.Second + rafthttp.ConnWriteTimeout): t.Fatalf("failed to remove member %s in time", m.s.ID()) } }