From 4a9058a07eeb8c55ad83e45b712723156c7f2bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Tisa=CC=88ter?= Date: Fri, 9 May 2014 03:24:13 +0200 Subject: [PATCH] Sleep since no obvious way to wait for shutdown --- consul/leader_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/consul/leader_test.go b/consul/leader_test.go index b99924eebf..8e4c4a63b1 100644 --- a/consul/leader_test.go +++ b/consul/leader_test.go @@ -8,6 +8,7 @@ import ( "os" "testing" "errors" + "time" ) func TestLeader_RegisterMember(t *testing.T) { @@ -310,6 +311,7 @@ func TestLeader_LeftServer(t *testing.T) { // Kill any server servers[0].Shutdown() + time.Sleep(100 * time.Millisecond) // Force remove the non-leader (transition to left state) if err := servers[1].RemoveFailedNode(servers[0].config.NodeName); err != nil {