etcdmain: test wrong heartbeat-interval, election-timeout in TestConfigFileElectionTimeout

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyu-Ho Lee 2017-11-28 09:40:54 -08:00
parent cffa130253
commit c8277e1b02

View File

@ -460,8 +460,19 @@ func TestConfigFileElectionTimeout(t *testing.T) {
},
{
ElectionMs: 60000,
TickMs: 10000,
errStr: "is too long, and should be set less than",
},
{
ElectionMs: 100,
TickMs: 0,
errStr: "--heartbeat-interval must be >0 (set to 0ms)",
},
{
ElectionMs: 0,
TickMs: 100,
errStr: "--election-timeout must be >0 (set to 0ms)",
},
}
for i, tt := range tests {