diff --git a/command/exec_test.go b/command/exec_test.go index 0e259e5364..4377756a0c 100644 --- a/command/exec_test.go +++ b/command/exec_test.go @@ -79,10 +79,7 @@ func waitForLeader(t *testing.T, httpAddr string) { } testutil.WaitForResult(func() (bool, error) { _, qm, err := client.Catalog().Nodes(nil) - if err != nil { - return false, err - } - return qm.KnownLeader, nil + return err == nil && qm.KnownLeader && qm.LastIndex > 0, err }, func(err error) { t.Fatalf("failed to find leader: %v", err) }) diff --git a/consul/structs/.structs.go.swp b/consul/structs/.structs.go.swp new file mode 100644 index 0000000000..ed95aabf2a Binary files /dev/null and b/consul/structs/.structs.go.swp differ