From 1fa4cb7ba15b2e3166a30258fd99e13eac5fdd0e Mon Sep 17 00:00:00 2001 From: Benjamin Chalmers <111370568+ben-bud@users.noreply.github.com> Date: Thu, 27 Oct 2022 23:12:30 +0100 Subject: caddytest: Increased sleep between retries to reduce flakey tests in CI (#5160) * Incresed sleep between retries to reduce flakey tests in CI * Also changed wait time for admin * Modified time to make it more reliable Co-authored-by: Mohammed Al Sahaf --- caddytest/caddytest.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'caddytest') diff --git a/caddytest/caddytest.go b/caddytest/caddytest.go index ca10fab..868b427 100644 --- a/caddytest/caddytest.go +++ b/caddytest/caddytest.go @@ -218,7 +218,7 @@ func (tc *Tester) ensureConfigRunning(rawConfig string, configType string) error if reflect.DeepEqual(expected, fetchConfig(client)) { return nil } - time.Sleep(10 * time.Millisecond) + time.Sleep(1 * time.Second) } tc.t.Errorf("POSTed configuration isn't active") return errors.New("EnsureConfigRunning: POSTed configuration isn't active") @@ -244,7 +244,7 @@ func validateTestPrerequisites() error { // wait for caddy to start serving the initial config for retries := 10; retries > 0 && isCaddyAdminRunning() != nil; retries-- { - time.Sleep(10 * time.Millisecond) + time.Sleep(1 * time.Second) } } -- cgit v1.2.3