summaryrefslogtreecommitdiff
path: root/caddytest
diff options
context:
space:
mode:
Diffstat (limited to 'caddytest')
-rw-r--r--caddytest/caddytest.go4
-rw-r--r--caddytest/integration/reverseproxy_test.go2
2 files changed, 4 insertions, 2 deletions
diff --git a/caddytest/caddytest.go b/caddytest/caddytest.go
index 2ffd313..ca10fab 100644
--- a/caddytest/caddytest.go
+++ b/caddytest/caddytest.go
@@ -214,7 +214,7 @@ func (tc *Tester) ensureConfigRunning(rawConfig string, configType string) error
return actual
}
- for retries := 4; retries > 0; retries-- {
+ for retries := 10; retries > 0; retries-- {
if reflect.DeepEqual(expected, fetchConfig(client)) {
return nil
}
@@ -243,7 +243,7 @@ func validateTestPrerequisites() error {
}()
// wait for caddy to start serving the initial config
- for retries := 4; retries > 0 && isCaddyAdminRunning() != nil; retries-- {
+ for retries := 10; retries > 0 && isCaddyAdminRunning() != nil; retries-- {
time.Sleep(10 * time.Millisecond)
}
}
diff --git a/caddytest/integration/reverseproxy_test.go b/caddytest/integration/reverseproxy_test.go
index 81aec71..049c7fd 100644
--- a/caddytest/integration/reverseproxy_test.go
+++ b/caddytest/integration/reverseproxy_test.go
@@ -8,6 +8,7 @@ import (
"runtime"
"strings"
"testing"
+ "time"
"github.com/caddyserver/caddy/v2/caddytest"
)
@@ -441,6 +442,7 @@ func TestReverseProxyHealthCheck(t *testing.T) {
}
`, "caddyfile")
+ time.Sleep(100 * time.Millisecond) // TODO: for some reason this test seems particularly flaky, getting 503 when it should be 200, unless we wait
tester.AssertGetResponse("http://localhost:9080/", 200, "Hello, World!")
}