Merge pull request #1482 from smallstep/fix-reload-tests

Wait for Accept in TestBootstrapClientServerRotation
This commit is contained in:
Mariano Cano 2023-07-19 15:03:52 -07:00 committed by GitHub
commit d604a900ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {