Browse Source

functional-tester/tester: configure heartbeat interval, election timeout

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Gyuho Lee 7 years ago
parent
commit
a831d15751

+ 6 - 0
tools/functional-tester/tester/cluster_test.go

@@ -41,6 +41,8 @@ func Test_newCluster(t *testing.T) {
 					Name:                     "s1",
 					DataDir:                  "/tmp/etcd-agent-data-1/etcd.data",
 					WALDir:                   "/tmp/etcd-agent-data-1/etcd.data/member/wal",
+					HeartbeatIntervalMs:      100,
+					ElectionTimeoutMs:        1000,
 					ListenClientURLs:         []string{"http://127.0.0.1:1379"},
 					AdvertiseClientURLs:      []string{"http://127.0.0.1:1379"},
 					ListenPeerURLs:           []string{"http://127.0.0.1:1380"},
@@ -68,6 +70,8 @@ func Test_newCluster(t *testing.T) {
 					Name:                     "s2",
 					DataDir:                  "/tmp/etcd-agent-data-2/etcd.data",
 					WALDir:                   "/tmp/etcd-agent-data-2/etcd.data/member/wal",
+					HeartbeatIntervalMs:      100,
+					ElectionTimeoutMs:        1000,
 					ListenClientURLs:         []string{"http://127.0.0.1:2379"},
 					AdvertiseClientURLs:      []string{"http://127.0.0.1:2379"},
 					ListenPeerURLs:           []string{"http://127.0.0.1:2380"},
@@ -95,6 +99,8 @@ func Test_newCluster(t *testing.T) {
 					Name:                     "s3",
 					DataDir:                  "/tmp/etcd-agent-data-3/etcd.data",
 					WALDir:                   "/tmp/etcd-agent-data-3/etcd.data/member/wal",
+					HeartbeatIntervalMs:      100,
+					ElectionTimeoutMs:        1000,
 					ListenClientURLs:         []string{"http://127.0.0.1:3379"},
 					AdvertiseClientURLs:      []string{"http://127.0.0.1:3379"},
 					ListenPeerURLs:           []string{"http://127.0.0.1:3380"},

+ 6 - 0
tools/functional-tester/tester/local-test.yaml

@@ -12,6 +12,8 @@ agent-configs:
     name: s1
     data-dir: /tmp/etcd-agent-data-1/etcd.data
     wal-dir: /tmp/etcd-agent-data-1/etcd.data/member/wal
+    heartbeat-interval: 100
+    election-timeout: 1000
     listen-client-urls: ["http://127.0.0.1:1379"]
     advertise-client-urls: ["http://127.0.0.1:1379"]
     listen-peer-urls: ["http://127.0.0.1:1380"]
@@ -36,6 +38,8 @@ agent-configs:
     name: s2
     data-dir: /tmp/etcd-agent-data-2/etcd.data
     wal-dir: /tmp/etcd-agent-data-2/etcd.data/member/wal
+    heartbeat-interval: 100
+    election-timeout: 1000
     listen-client-urls: ["http://127.0.0.1:2379"]
     advertise-client-urls: ["http://127.0.0.1:2379"]
     listen-peer-urls: ["http://127.0.0.1:2380"]
@@ -60,6 +64,8 @@ agent-configs:
     name: s3
     data-dir: /tmp/etcd-agent-data-3/etcd.data
     wal-dir: /tmp/etcd-agent-data-3/etcd.data/member/wal
+    heartbeat-interval: 100
+    election-timeout: 1000
     listen-client-urls: ["http://127.0.0.1:3379"]
     advertise-client-urls: ["http://127.0.0.1:3379"]
     listen-peer-urls: ["http://127.0.0.1:3380"]