mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-27 23:03:37 -05:00
noot
This commit is contained in:
parent
b491fc5d6c
commit
41a4320fd3
2 changed files with 3 additions and 5 deletions
|
@ -93,7 +93,6 @@ func (tc *Tester) CleanupCaddy() error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("couldn't stop caddytest server: %w", err)
|
||||
}
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
for retries := 0; retries < 10; retries++ {
|
||||
if isCaddyAdminRunning() != nil {
|
||||
return nil
|
||||
|
@ -206,8 +205,8 @@ func (tc *Tester) startServer() error {
|
|||
caddycmd.Main()
|
||||
}()
|
||||
// wait for caddy admin api to start. it should happen quickly.
|
||||
for retries := 3; retries > 0 && isCaddyAdminRunning() != nil; retries-- {
|
||||
time.Sleep(1 * time.Second)
|
||||
for retries := 10; retries > 0 && isCaddyAdminRunning() != nil; retries-- {
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
}
|
||||
|
||||
// one more time to return the error
|
||||
|
|
|
@ -24,8 +24,7 @@ func AssertLoadError(t *testing.T, rawConfig string, configType string, expected
|
|||
if !strings.Contains(err.Error(), expectedError) {
|
||||
t.Errorf("expected error \"%s\" but got \"%s\"", expectedError, err.Error())
|
||||
}
|
||||
err = tc.CleanupCaddy()
|
||||
require.NoError(t, err)
|
||||
tc.CleanupCaddy()
|
||||
}
|
||||
|
||||
// CompareAdapt adapts a config and then compares it against an expected result
|
||||
|
|
Loading…
Add table
Reference in a new issue