From 91320989602753efbac08d06719e268827072fb2 Mon Sep 17 00:00:00 2001 From: Yicheng Qin Date: Tue, 6 Jan 2015 11:55:24 -0800 Subject: [PATCH] integration: wait longer for member to be removed --- integration/cluster_test.go | 5 +++-- test | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/integration/cluster_test.go b/integration/cluster_test.go index 938cd8f3e..cacd55621 100644 --- a/integration/cluster_test.go +++ b/integration/cluster_test.go @@ -308,8 +308,9 @@ func (c *cluster) RemoveMember(t *testing.T, id uint64) { select { case <-m.s.StopNotify(): m.Terminate(t) - case <-time.After(time.Second): - t.Fatalf("failed to remove member %s in one second", m.s.ID()) + // stop delay / election timeout + 1s disk and network delay + case <-time.After(time.Duration(electionTicks)*tickDuration + time.Second): + t.Fatalf("failed to remove member %s in time", m.s.ID()) } } } diff --git a/test b/test index 444f77c95..27e192eb8 100755 --- a/test +++ b/test @@ -39,7 +39,7 @@ split=(${TEST// / }) TEST=${split[@]/#/${REPO_PATH}/} echo "Running tests..." -go test -timeout 60s ${COVER} $@ ${TEST} --race +go test -timeout 3m ${COVER} $@ ${TEST} --race echo "Checking gofmt..." fmtRes=$(gofmt -l $FMT)