From 92fd596d32d2b2e59d5ac6442f4ba6a64d7930f5 Mon Sep 17 00:00:00 2001 From: "R.B. Boyer" Date: Tue, 24 Sep 2019 11:24:48 -0500 Subject: [PATCH] api/watch: try to avoid more flakes in this package (#6538) --- api/watch/funcs_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/watch/funcs_test.go b/api/watch/funcs_test.go index 6c6f4485c8..664f5f68f0 100644 --- a/api/watch/funcs_test.go +++ b/api/watch/funcs_test.go @@ -32,6 +32,8 @@ func makeClient(t *testing.T) (*api.Client, *testutil.TestServer) { require.NoError(t, err) conf.Address = server.HTTPAddr + server.WaitForLeader(t) + // Create client client, err := api.NewClient(conf) if err != nil { @@ -370,6 +372,8 @@ func TestNodesWatch(t *testing.T) { c, s := makeClient(t) defer s.Stop() + s.WaitForSerfCheck(t) // wait for AE to sync + var ( wakeups [][]*api.Node notifyCh = make(chan struct{})