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.
This commit is contained in:
Sean Chittenden 2016-02-24 11:54:16 -08:00
parent 26e51376d9
commit 0c519aa90d
1 changed files with 3 additions and 5 deletions

View File

@ -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")
})