Skip to content

Commit e917d25

Browse files
authored
Increase test timeout to 30m (#3165)
Inspired by this https://github.com/databricks/cli/actions/runs/16021325523/job/45198831160 ``` === FAIL: acceptance (0.00s) panic: test timed out after 10m0s running tests: TestAccept/cmd/workspace/apps/run-local/DATABRICKS_CLI_DEPLOYMENT=terraform (2m44s) goroutine 10059 [running]: testing.(*M).startAlarm.func1() C:/Users/runneradmin/go/pkg/mod/golang.org/[email protected]/src/testing/testing.go:2484 +0x394 created by time.goFunc C:/Users/runneradmin/go/pkg/mod/golang.org/[email protected]/src/time/sleep.go:215 +0x2d goroutine 1 [chan receive, 8 minutes]: testing.(*T).Run(0xc0000036c0, {0x182d05c?, 0x7ffb6b657690?}, 0x193d280) C:/Users/runneradmin/go/pkg/mod/golang.org/[email protected]/src/testing/testing.go:1859 +0x414 ... ```
1 parent 5f364d0 commit e917d25

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ PACKAGES=./acceptance/... ./libs/... ./internal/... ./cmd/... ./bundle/... .
44

55
GOTESTSUM_FORMAT ?= pkgname-and-test-fails
66
GOTESTSUM_CMD ?= go tool gotestsum --format ${GOTESTSUM_FORMAT} --no-summary=skipped --jsonfile test-output.json
7+
LOCAL_TIMEOUT ?= 30m
78

89

910
lintfull:
@@ -46,13 +47,13 @@ links:
4647
checks: tidy ws links
4748

4849
test:
49-
${GOTESTSUM_CMD} -- ${PACKAGES}
50+
${GOTESTSUM_CMD} -- ${PACKAGES} -timeout=${LOCAL_TIMEOUT}
5051

5152
# Updates acceptance test output (local tests)
5253
test-update:
53-
-go test ./acceptance -run '^TestAccept$$' -update
54+
-go test ./acceptance -run '^TestAccept$$' -update -timeout=${LOCAL_TIMEOUT}
5455
@# at the moment second pass is required because some tests show diff against output of another test for easier review
55-
-go test ./acceptance -run '^TestAccept$$' -update
56+
-go test ./acceptance -run '^TestAccept$$' -update -timeout=${LOCAL_TIMEOUT}
5657

5758
# Updates acceptance test output (integration tests, requires access)
5859
test-update-aws:
@@ -65,7 +66,7 @@ slowest:
6566

6667
cover:
6768
rm -fr ./acceptance/build/cover/
68-
VERBOSE_TEST=1 CLI_GOCOVERDIR=build/cover ${GOTESTSUM_CMD} -- -coverprofile=coverage.txt ${PACKAGES}
69+
VERBOSE_TEST=1 CLI_GOCOVERDIR=build/cover ${GOTESTSUM_CMD} -- -coverprofile=coverage.txt ${PACKAGES} -timeout=${LOCAL_TIMEOUT}
6970
rm -fr ./acceptance/build/cover-merged/
7071
mkdir -p acceptance/build/cover-merged/
7172
go tool covdata merge -i $$(printf '%s,' acceptance/build/cover/* | sed 's/,$$//') -o acceptance/build/cover-merged/

0 commit comments

Comments
 (0)