From fe3bfef0e7c004bd8addef1e9e7975fd29166543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paolo=20Chil=C3=A0?= Date: Thu, 5 Oct 2023 09:11:52 +0200 Subject: [PATCH] Increase sleep time for install progress tests (#3493) Increase the sleep timeout for testcase `TestProgress/single_step_delayed_failure` to avoid flakiness on Windows. The tick interval for the test is set to 10 ms but the code allows for variance between 65% and 250% of such value and it expects at least 1 tick to happen (it is asserted on the regexp match as at least 1 additional `.`) Original sleep time of 15 ms would not cover the whole possible interval, after testing on windows with different timings the most reliable seems to be ~100ms (40-50 ms would still yield a few failures when run 10000 times in a loop) (cherry picked from commit 6636206aaf6801f87bb6cc63ceff17d978519e50) --- internal/pkg/agent/install/progress_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/pkg/agent/install/progress_test.go b/internal/pkg/agent/install/progress_test.go index c37dff4595b..2bb9bb6b1d3 100644 --- a/internal/pkg/agent/install/progress_test.go +++ b/internal/pkg/agent/install/progress_test.go @@ -51,7 +51,7 @@ func TestProgress(t *testing.T) { rs := pt.Start() s := rs.StepStart("step 1 starting") - time.Sleep(15 * time.Millisecond) // to simulate work being done + time.Sleep(100 * time.Millisecond) // to simulate work being done s.Failed() rs.Failed()