Skip to content

Commit 75ff579

Browse files
authored
fix: Decrease postgres test timeout (make test-postgres) (coder#3108)
This commit lowers the postgres test timeout from 30m to 20m, currently our postgres tests seem to take 8-10m, a 2x factor should suffice. Comments were updated in both places to reflect the reasoning and necessity of keeping these values in sync. They used to take longer but the `count` was lowered in 3d40cb8. The actual timeout value of `make test-postgres` got overlooked in coder#3079.
1 parent 0aa8c2e commit 75ff579

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/coder.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,10 @@ jobs:
233233
test-go-postgres:
234234
name: "test/go/postgres"
235235
runs-on: ubuntu-latest
236-
# This timeout must be greater than go test -timeout.
236+
# This timeout must be greater than the timeout set by `go test` in
237+
# `make test-postgres` to ensure we receive a trace of running
238+
# goroutines. Setting this to the timeout +5m should work quite well
239+
# even if some of the preceding steps are slow.
237240
timeout-minutes: 25
238241
steps:
239242
- uses: actions/checkout@v3

Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,11 @@ test: test-clean
171171
gotestsum -- -v -short ./...
172172
.PHONY: test
173173

174+
# When updating -timeout for this test, keep in sync with
175+
# test-go-postgres (.github/workflows/coder.yaml).
174176
test-postgres: test-clean test-postgres-docker
175177
DB=ci DB_FROM=$(shell go run scripts/migrate-ci/main.go) gotestsum --junitfile="gotests.xml" --packages="./..." -- \
176-
-covermode=atomic -coverprofile="gotests.coverage" -timeout=30m \
178+
-covermode=atomic -coverprofile="gotests.coverage" -timeout=20m \
177179
-coverpkg=./...,github.com/coder/coder/codersdk \
178180
-count=1 -race -failfast
179181
.PHONY: test-postgres

0 commit comments

Comments
 (0)