integration: expose ElectionTimeout, multiply ticks to timeout

To be consistent with etcdserver

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyu-Ho Lee
2017-10-30 09:22:40 -07:00
parent 87ad10c155
commit a41f3b64aa
2 changed files with 4 additions and 4 deletions

View File

@ -608,8 +608,8 @@ func (m *member) listenGRPC() error {
return nil
}
func (m *member) electionTimeout() time.Duration {
return time.Duration(m.s.Cfg.ElectionTicks) * time.Millisecond
func (m *member) ElectionTimeout() time.Duration {
return time.Duration(m.s.Cfg.ElectionTicks*int(m.s.Cfg.TickMs)) * time.Millisecond
}
func (m *member) ID() types.ID { return m.s.ID() }