consul: Fix failing globalRPC test

This commit is contained in:
Chavez 2014-12-04 21:32:59 -08:00
parent b4021621b5
commit c6b3cae106
1 changed files with 6 additions and 0 deletions

View File

@ -489,6 +489,12 @@ func TestServer_globalRPCErrors(t *testing.T) {
defer os.RemoveAll(dir1) defer os.RemoveAll(dir1)
defer s1.Shutdown() defer s1.Shutdown()
testutil.WaitForResult(func() (bool, error) {
return len(s1.remoteConsuls) == 1, nil
}, func(err error) {
t.Fatalf("Server did not join LAN successfully")
})
// Check that an error from a remote DC is returned // Check that an error from a remote DC is returned
err := s1.globalRPC("Bad.Method", nil, &fakeGlobalResp{}) err := s1.globalRPC("Bad.Method", nil, &fakeGlobalResp{})
if err == nil { if err == nil {