Mask acceptance test flakiness with retries (#387)
This commit is contained in:
9
.github/workflows/acctest.yml
vendored
9
.github/workflows/acctest.yml
vendored
@@ -33,6 +33,11 @@ jobs:
|
||||
go-version-file: "go.mod"
|
||||
check-latest: true
|
||||
|
||||
# The acceptance tests sometimes timeout for some unknown reason.
|
||||
- name: TF acceptance tests
|
||||
timeout-minutes: 20
|
||||
run: make testacc UNIFI_STDOUT=true UNIFI_VERSION=${{ matrix.unifi_download_url && 'beta' || matrix.unifi_version }} UNIFI_DOWNLOAD_URL=${{ matrix.unifi_download_url }}
|
||||
uses: "nick-fields/retry@v2"
|
||||
with:
|
||||
timeout_minutes: 20
|
||||
max_attempts: 3
|
||||
command: make testacc TEST_TIMEOUT=1h UNIFI_STDOUT=true UNIFI_VERSION=${{ matrix.unifi_download_url && 'beta' || matrix.unifi_version }} UNIFI_DOWNLOAD_URL=${{ matrix.unifi_download_url }}
|
||||
retry_on: "timeout"
|
||||
|
||||
9
Makefile
9
Makefile
@@ -1,6 +1,7 @@
|
||||
TEST ?= ./...
|
||||
TESTARGS ?=
|
||||
TEST_COUNT ?= 1
|
||||
TEST ?= ./...
|
||||
TESTARGS ?=
|
||||
TEST_COUNT ?= 1
|
||||
TEST_TIMEOUT ?= 10m
|
||||
|
||||
.PHONY: default
|
||||
default: build
|
||||
@@ -11,4 +12,4 @@ build:
|
||||
|
||||
.PHONY: testacc
|
||||
testacc:
|
||||
TF_ACC=1 go test $(TEST) -v -count=$(TEST_COUNT) $(TESTARGS)
|
||||
TF_ACC=1 go test $(TEST) -v -count $(TEST_COUNT) -timeout $(TEST_TIMEOUT) $(TESTARGS)
|
||||
|
||||
Reference in New Issue
Block a user