From d741a999f5d0c124fac9a8374d1abb715943549d Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Fri, 10 Jan 2014 11:07:29 -0800 Subject: [PATCH] Refactor testServerDC --- consul/server_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/consul/server_test.go b/consul/server_test.go index be9bfc10b..fdff0f462 100644 --- a/consul/server_test.go +++ b/consul/server_test.go @@ -30,9 +30,13 @@ func testServer(t *testing.T) (string, *Server) { } func testServerDC(t *testing.T, dc string) (string, *Server) { + return testServerDCBootstrap(t, "dc1", true) +} + +func testServerDCBootstrap(t *testing.T, dc string, bootstrap bool) (string, *Server) { dir := tmpDir(t) config := DefaultConfig() - config.Bootstrap = true + config.Bootstrap = bootstrap config.Datacenter = dc config.DataDir = dir @@ -60,6 +64,8 @@ func testServerDC(t *testing.T, dc string) (string, *Server) { config.RaftConfig.HeartbeatTimeout = 40 * time.Millisecond config.RaftConfig.ElectionTimeout = 40 * time.Millisecond + config.ReconcileInterval = 50 * time.Millisecond + server, err := NewServer(config) if err != nil { t.Fatalf("err: %v", err)