Fix typo in variable name ("ELECTIONTIMTOUT").
parent
9cbe9c52f9
commit
38b9758a5b
4
etcd.go
4
etcd.go
|
@ -101,7 +101,7 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ELECTIONTIMTOUT = 200 * time.Millisecond
|
ELECTIONTIMEOUT = 200 * time.Millisecond
|
||||||
HEARTBEATTIMEOUT = 50 * time.Millisecond
|
HEARTBEATTIMEOUT = 50 * time.Millisecond
|
||||||
|
|
||||||
// Timeout for internal raft http connection
|
// Timeout for internal raft http connection
|
||||||
|
@ -233,7 +233,7 @@ func startRaft(securityType int) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
raftServer.SetElectionTimeout(ELECTIONTIMTOUT)
|
raftServer.SetElectionTimeout(ELECTIONTIMEOUT)
|
||||||
raftServer.SetHeartbeatTimeout(HEARTBEATTIMEOUT)
|
raftServer.SetHeartbeatTimeout(HEARTBEATTIMEOUT)
|
||||||
|
|
||||||
raftServer.Start()
|
raftServer.Start()
|
||||||
|
|
|
@ -54,8 +54,8 @@ func TestKillLeader(t *testing.T) {
|
||||||
totalTime += take
|
totalTime += take
|
||||||
avgTime := totalTime / (time.Duration)(i+1)
|
avgTime := totalTime / (time.Duration)(i+1)
|
||||||
|
|
||||||
fmt.Println("Leader election time is ", take, "with election timeout", ELECTIONTIMTOUT)
|
fmt.Println("Leader election time is ", take, "with election timeout", ELECTIONTIMEOUT)
|
||||||
fmt.Println("Leader election time average is", avgTime, "with election timeout", ELECTIONTIMTOUT)
|
fmt.Println("Leader election time average is", avgTime, "with election timeout", ELECTIONTIMEOUT)
|
||||||
etcds[num], err = os.StartProcess("etcd", argGroup[num], procAttr)
|
etcds[num], err = os.StartProcess("etcd", argGroup[num], procAttr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue