integration: wait longer for member to be removed

This commit is contained in:
Yicheng Qin 2015-01-06 11:55:24 -08:00
parent 930156c18a
commit 9132098960
2 changed files with 4 additions and 3 deletions

View File

@ -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())
}
}
}

2
test
View File

@ -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)