From faab194247347a0a2d50abb0e7acfab181b03b1f Mon Sep 17 00:00:00 2001 From: Neil Dunbar Date: Wed, 4 Dec 2013 17:39:03 +0000 Subject: [PATCH] Fixed test case --- tests/server_utils.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/server_utils.go b/tests/server_utils.go index e3e7d5323..78df037ba 100644 --- a/tests/server_utils.go +++ b/tests/server_utils.go @@ -14,6 +14,8 @@ const ( testClientURL = "localhost:4401" testRaftURL = "localhost:7701" testSnapshotCount = 10000 + testHeartbeatTimeout = 50 + testElectionTimeout = 200 ) // Starts a server in a temporary directory. @@ -23,7 +25,7 @@ func RunServer(f func(*server.Server)) { store := store.New() registry := server.NewRegistry(store) - ps := server.NewPeerServer(testName, path, testRaftURL, testRaftURL, &server.TLSConfig{Scheme: "http"}, &server.TLSInfo{}, registry, store, testSnapshotCount) + ps := server.NewPeerServer(testName, path, testRaftURL, testRaftURL, &server.TLSConfig{Scheme: "http"}, &server.TLSInfo{}, registry, store, testSnapshotCount, testHeartbeatTimeout, testElectionTimeout) s := server.New(testName, testClientURL, testClientURL, &server.TLSConfig{Scheme: "http"}, &server.TLSInfo{}, ps, registry, store) ps.SetServer(s)