-
Notifications
You must be signed in to change notification settings - Fork 155
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
Conversation
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.
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
This pull request does not have a backport label. Could you fix it @cmacknz? 🙏
NOTE: |
// 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 |
There was a problem hiding this comment.
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.
- 2h9m https://buildkite.com/elastic/elastic-agent/builds/7928#018e6376-e786-4ba4-b2eb-fc521ed64ae7
- 2h7m https://buildkite.com/elastic/elastic-agent/builds/7938#018e6a11-a2db-466f-8b8f-548febe75ddb
- 1h53m https://buildkite.com/elastic/elastic-agent/builds/7916
We could probably shorten this but I want to avoid false positives.
|
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.