Skip to content

Commit

Permalink
Increase sleep time for install progress tests (#3493)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
pchila authored Oct 5, 2023
1 parent a2a92fc commit 6636206
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/pkg/agent/install/progress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 6636206

Please sign in to comment.