Skip to content

Commit

Permalink
Merge pull request #1482 from smallstep/fix-reload-tests
Browse files Browse the repository at this point in the history
Wait for Accept in TestBootstrapClientServerRotation
  • Loading branch information
maraino committed Jul 19, 2023
2 parents cbc46d1 + 0c3a1ae commit d604a90
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ca/bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,13 @@ func doReload(ca *CA) error {
}
// Use same address in new server
newCA.srv.Addr = ca.srv.Addr
return ca.srv.Reload(newCA.srv)
if err := ca.srv.Reload(newCA.srv); err != nil {
return err
}

// Wait a few ms until the http server calls listener.Accept()
time.Sleep(100 * time.Millisecond)
return nil
}

func TestBootstrapListener(t *testing.T) {
Expand Down

0 comments on commit d604a90

Please sign in to comment.