Skip to content

Add a retry to PG connections to reduce test flakiness #6059

Add a retry to PG connections to reduce test flakiness

Add a retry to PG connections to reduce test flakiness #6059

Triggered via pull request January 30, 2024 21:21
Status Failure
Total duration 7m 11s
Artifacts

lint.yaml

on: pull_request
Lint Go
2m 23s
Lint Go
Lint YAML & Markdown
39s
Lint YAML & Markdown
Trivvy: Analyze FS and Image
2m 46s
Trivvy: Analyze FS and Image
Matrix: Analyze with CodeQL
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 5 warnings
Lint Go: internal/testserver/datastore/postgres.go#L1
Please run go run mage.go lint:go. diff --git a/internal/testserver/datastore/postgres.go b/internal/testserver/datastore/postgres.go index 73d4a39..9194600 100644 --- a/internal/testserver/datastore/postgres.go +++ b/internal/testserver/datastore/postgres.go @@ -128,8 +128,10 @@ func (b *postgresTester) NewDatabase(t testing.TB) string { ) } -const retryCount = 3 -const timeBetweenRetries = 100 * time.Millisecond +const ( + retryCount = 3 + timeBetweenRetries = 100 * time.Millisecond +) func (b *postgresTester) NewDatastore(t testing.TB, initFunc InitFunc) datastore.Datastore { connectStr := b.NewDatabase(t)
Lint Go
Process completed with exit code 1.
Lint YAML & Markdown
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Trivvy: Analyze FS and Image
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, buildjet/setup-go@v4, goreleaser/goreleaser-action@v4. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Lint Go
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, buildjet/setup-go@v4. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Analyze with CodeQL (go)
CodeQL Action v2 will be deprecated on December 5th, 2024. Please update all occurrences of the CodeQL Action in your workflow files to v3. For more information, see https://github.blog/changelog/2024-01-12-code-scanning-deprecation-of-codeql-action-v2/
Analyze with CodeQL (go)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, github/codeql-action/init@v2, github/codeql-action/autobuild@v2, github/codeql-action/analyze@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.