Skip to content

Commit

Permalink
test: wait for keyring in plan submission tests (#24122)
Browse files Browse the repository at this point in the history
In #23977 we merged a change to how the keyring was stored. Because keyring
initialization takes slightly longer now, this uncovered existing timing bugs in
some of our tests where tests that require the keyring (ex. plan applier tests)
were waiting for the leader but not the keyring initialization. Fix another
example we've seen causing test flakes.
  • Loading branch information
tgross authored Oct 3, 2024
1 parent 7526c91 commit f7d4bd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nomad/worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ func TestWorker_SubmitPlan(t *testing.T) {
c.EnabledSchedulers = []string{structs.JobTypeService}
})
defer cleanupS1()
testutil.WaitForLeader(t, s1.RPC)
testutil.WaitForKeyring(t, s1.RPC, s1.Region())

// Register node
node := mock.Node()
Expand Down

0 comments on commit f7d4bd2

Please sign in to comment.