Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make go test timeout configurable in test job #721

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

kaldorn
Copy link
Contributor

@kaldorn kaldorn commented Jan 10, 2024

Please read CONTRIBUTING.md for additional information on contributing to this repository!

What this PR does / why we need it

Unfortunately, I have a test that takes longer than 10 minutes and this isn't currently configurable.

The test.sh looks for this env var and sets the timeout flag:

devbase/shell/test.sh

Lines 103 to 106 in be1b62d

# If GO_TEST_TIMEOUT is set, we pass it to `go test` as a timeout.
if [[ -n $GO_TEST_TIMEOUT ]]; then
TEST_FLAGS+=(-timeout "$GO_TEST_TIMEOUT")
fi

Jira ID

[XX-XX]

Notes for your reviewers

@kaldorn kaldorn requested a review from a team as a code owner January 10, 2024 23:00
@@ -53,6 +57,7 @@ executor:
environment:
AWS_REGION: << parameters.aws_region >>
PRE_SETUP_SCRIPT: << parameters.pre_setup_script >>
GO_TEST_TIMEOUT: << parameters.go_test_timeout >>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so i take it this is used in a script somewhere when we run the tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup.

devbase/shell/test.sh

Lines 103 to 106 in be1b62d

# If GO_TEST_TIMEOUT is set, we pass it to `go test` as a timeout.
if [[ -n $GO_TEST_TIMEOUT ]]; then
TEST_FLAGS+=(-timeout "$GO_TEST_TIMEOUT")
fi

Copy link
Member

@malept malept left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it's the same as the one for the E2E tests, so :shipit:

@kaldorn kaldorn merged commit 84a8158 into main Jan 10, 2024
4 checks passed
@kaldorn kaldorn deleted the feat-make-go-test-timeout-configurable-in-test-job branch January 10, 2024 23:05
@getoutreach-ci-2
Copy link

🎉 This PR is included in version 2.24.0-rc.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@getoutreach-ci-1
Copy link
Contributor

🎉 This PR is included in version 2.24.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants