Skip to content

Commit 899836d

Browse files
authored
chore: reduce Windows PG tests flakiness (coder#16090)
This PR: - Reduces test parallelism on Windows in CI - Unifies wait intervals on Windows with Linux and macOS. Previously we had custom intervals for Windows to reduce test flakiness on smaller CI workers, but we don't run tests on small CI workers anymore. Due to how our CI file is defined, forks run tests on small CI machines, but I'm not sure if the different intervals actually help or whether that's a heuristic that happened to fix issues on a particular day and was it ever reevaluated. I propose we make the change and if someone complains, revert it. In particular, reduced test parallelism seems to actually help: I was able to run Windows tests 5 times in a row without flakes. Not sure if that's going to fix the problem long term, but it seems worth trying.
1 parent 630fd7c commit 899836d

File tree

3 files changed

+4
-27
lines changed

3 files changed

+4
-27
lines changed

.github/workflows/ci.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,10 @@ jobs:
445445
# C: drive is extremely slow: https://github.com/actions/runner-images/issues/8755
446446
mkdir -p "R:/temp/embedded-pg"
447447
go run scripts/embedded-pg/main.go -path "R:/temp/embedded-pg"
448-
DB=ci gotestsum --format standard-quiet -- -v -short -count=1 ./...
448+
# Reduce test parallelism, mirroring what we do for race tests.
449+
# We'd been encountering issues with timing related flakes, and
450+
# this seems to help.
451+
DB=ci gotestsum --format standard-quiet -- -v -short -count=1 -parallel 4 -p 4 ./...
449452
else
450453
go run scripts/embedded-pg/main.go
451454
DB=ci gotestsum --format standard-quiet -- -v -short -count=1 ./...

testutil/duration.go

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//go:build !windows
2-
31
package testutil
42

53
import (

testutil/duration_windows.go

-24
This file was deleted.

0 commit comments

Comments
 (0)