From c2c73bfeab035765bb8ed632563555bb5759de41 Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Wed, 24 Feb 2016 11:54:16 -0800 Subject: [PATCH] Unbreak client tests by reverting to original test Debugging code crept into the actual test and hung out for much longer than it should have. --- consul/client_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/consul/client_test.go b/consul/client_test.go index 2dec18d4c4..1249800949 100644 --- a/consul/client_test.go +++ b/consul/client_test.go @@ -83,11 +83,10 @@ func TestClient_JoinLAN(t *testing.T) { if _, err := c1.JoinLAN([]string{addr}); err != nil { t.Fatalf("err: %v", err) } - numServers := c1.serverMgr.GetNumServers() testutil.WaitForResult(func() (bool, error) { - return numServers == 1, nil + return c1.serverMgr.GetNumServers() == 1, nil }, func(err error) { - t.Fatalf("expected consul server: %d", numServers) + t.Fatalf("expected consul server") }) // Check the members @@ -99,10 +98,9 @@ func TestClient_JoinLAN(t *testing.T) { t.Fatalf("bad len") }) - numServers = c1.serverMgr.GetNumServers() // Check we have a new consul testutil.WaitForResult(func() (bool, error) { - return numServers == 1, nil + return c1.serverMgr.GetNumServers() == 1, nil }, func(err error) { t.Fatalf("expected consul server") })