Skip to content

Commit

Permalink
Fix flaky snapshot test.
Browse files Browse the repository at this point in the history
  • Loading branch information
hashi-derek committed Nov 6, 2023
1 parent 28b1469 commit 5cb614e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions agent/snapshot_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func TestSnapshot_Options(t *testing.T) {
t.Run(method, func(t *testing.T) {
a := NewTestAgent(t, TestACLConfig())
defer a.Shutdown()
testrpc.WaitForLeader(t, a.RPC, "dc1")

body := bytes.NewBuffer(nil)
req, _ := http.NewRequest(method, "/v1/snapshot", body)
Expand All @@ -88,6 +89,7 @@ func TestSnapshot_Options(t *testing.T) {
t.Run(method, func(t *testing.T) {
a := NewTestAgent(t, TestACLConfig())
defer a.Shutdown()
testrpc.WaitForLeader(t, a.RPC, "dc1")

body := bytes.NewBuffer(nil)
req, _ := http.NewRequest(method, "/v1/snapshot?dc=nope", body)
Expand All @@ -101,6 +103,7 @@ func TestSnapshot_Options(t *testing.T) {
t.Run(method, func(t *testing.T) {
a := NewTestAgent(t, TestACLConfig())
defer a.Shutdown()
testrpc.WaitForLeader(t, a.RPC, "dc1")

body := bytes.NewBuffer(nil)
req, _ := http.NewRequest(method, "/v1/snapshot?stale", body)
Expand Down

0 comments on commit 5cb614e

Please sign in to comment.