Skip to content

Commit

Permalink
Wait for JetStream leader in createJetStreamClusterEx
Browse files Browse the repository at this point in the history
This should reduce the chances of hitting `nats: JetStream not enabled for account`

Signed-off-by: Neil Twigg <neil@nats.io>
  • Loading branch information
neilalexander committed Aug 8, 2024
1 parent 0f0eb0f commit 76b053d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/jetstream_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,8 @@ func createJetStreamClusterEx(t testing.TB, tmpl, cName, snPre string, numServer
c.waitOnClusterReady()
}

// Wait for a JetStream metaleader to be elected.
c.waitOnLeader()
return c
}

Expand Down

0 comments on commit 76b053d

Please sign in to comment.