From 6f43117d4da27a83fa6fb7643d4482c5408c08ff Mon Sep 17 00:00:00 2001 From: kylecarbs Date: Thu, 16 Jun 2022 14:08:33 +0000 Subject: [PATCH] test: Increase timeouts to reduce flakes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's difficult to understand what's timing out due to a lock vs. taking a long time. This should help resolve! 🕵️ --- .github/workflows/coder.yaml | 4 ++-- Makefile | 2 +- cli/server_test.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 39a20bba18348..bd6d6f5753939 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -209,7 +209,7 @@ jobs: run: gotestsum --junitfile="gotests.xml" --packages="./..." -- -covermode=atomic -coverprofile="gotests.coverage" -coverpkg=./...,github.com/coder/coder/codersdk - -timeout=3m -count=$GOCOUNT -short -failfast + -timeout=5m -count=$GOCOUNT -short -failfast - name: Upload DataDog Trace if: always() && github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork @@ -316,7 +316,7 @@ jobs: deploy: name: "deploy" runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 30 if: github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork permissions: contents: read diff --git a/Makefile b/Makefile index a75a9cb2884c9..ed8584bad7eb9 100644 --- a/Makefile +++ b/Makefile @@ -115,7 +115,7 @@ test: test-clean .PHONY: test-postgres test-postgres: test-clean DB=ci gotestsum --junitfile="gotests.xml" --packages="./..." -- \ - -covermode=atomic -coverprofile="gotests.coverage" -timeout=5m \ + -covermode=atomic -coverprofile="gotests.coverage" -timeout=10m \ -coverpkg=./...,github.com/coder/coder/codersdk \ -count=1 -parallel=1 -race -failfast diff --git a/cli/server_test.go b/cli/server_test.go index 1a3ff7ee3bdf6..cb343547f93c1 100644 --- a/cli/server_test.go +++ b/cli/server_test.go @@ -56,7 +56,7 @@ func TestServer(t *testing.T) { assert.NoError(t, err) client = codersdk.New(accessURL) return true - }, 15*time.Second, 25*time.Millisecond) + }, time.Minute, 50*time.Millisecond) _, err = client.CreateFirstUser(ctx, codersdk.CreateFirstUserRequest{ Email: "some@one.com", Username: "example",