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

Ensure integration test setup has a timeout. #4478

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

cmacknz
Copy link
Member

@cmacknz cmacknz commented Mar 25, 2024

The top level context for integration tests comes from mage, which doesn't set a default timeout unless you give it one on the command line, which we don't do.

Detect when the timeout wasn't set, and force a reasonable default. Hopefully this prevents the tests from running indefinitely when the failure is in the setup and provisioning stage.

The top level context for integration tests comes from mage, which
doesn't set a default timeout unless you give it one on the command
line, which we don't do.

Detect when the timeout wasn't set, and force a reasonable default.
@cmacknz cmacknz added the Team:Elastic-Agent Label for the Agent team label Mar 25, 2024
@cmacknz cmacknz self-assigned this Mar 25, 2024
@cmacknz cmacknz requested a review from a team as a code owner March 25, 2024 17:33
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

Copy link
Contributor

mergify bot commented Mar 25, 2024

This pull request does not have a backport label. Could you fix it @cmacknz? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 8./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

// goIntegTestTimeout is the timeout passed to each instance of 'go test' used in integration tests.
goIntegTestTimeout = 2 * time.Hour
// goProvisionAndTestTimeout is the timeout used for both provisioning and running tests.
goProvisionAndTestTimeout = goIntegTestTimeout + 30*time.Minute
Copy link
Member Author

Choose a reason for hiding this comment

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

Scientifically chosen by looking at the total time of the integration test stage for recent builds. It frequently goes over 2h so I couldn't also use 2h for this.

We could probably shorten this but I want to avoid false positives.

Copy link

Quality Gate passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No Coverage information No data about Coverage
No Duplication information No data about Duplication

See analysis details on SonarQube

@cmacknz cmacknz merged commit 972546a into elastic:main Mar 25, 2024
9 of 12 checks passed
@cmacknz cmacknz deleted the enforce-mage-context-timeout branch March 25, 2024 19:50
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