Browse Source

Merge pull request #42 from juliusv/fix-var-typo

Fix typo in variable name ("ELECTIONTIMTOUT").
Xiang Li 12 years ago
parent
commit
d67dd7a156
2 changed files with 4 additions and 4 deletions
  1. 2 2
      etcd.go
  2. 2 2
      etcd_long_test.go

+ 2 - 2
etcd.go

@@ -101,7 +101,7 @@ const (
 )
 
 const (
-	ELECTIONTIMTOUT  = 200 * time.Millisecond
+	ELECTIONTIMEOUT  = 200 * time.Millisecond
 	HEARTBEATTIMEOUT = 50 * time.Millisecond
 
 	// Timeout for internal raft http connection
@@ -233,7 +233,7 @@ func startRaft(securityType int) {
 		}
 	}
 
-	raftServer.SetElectionTimeout(ELECTIONTIMTOUT)
+	raftServer.SetElectionTimeout(ELECTIONTIMEOUT)
 	raftServer.SetHeartbeatTimeout(HEARTBEATTIMEOUT)
 
 	raftServer.Start()

+ 2 - 2
etcd_long_test.go

@@ -54,8 +54,8 @@ func TestKillLeader(t *testing.T) {
 		totalTime += take
 		avgTime := totalTime / (time.Duration)(i+1)
 
-		fmt.Println("Leader election time is ", take, "with election timeout", ELECTIONTIMTOUT)
-		fmt.Println("Leader election time average is", avgTime, "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", ELECTIONTIMEOUT)
 		etcds[num], err = os.StartProcess("etcd", argGroup[num], procAttr)
 	}