-
Notifications
You must be signed in to change notification settings - Fork 154
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
Fix Windows flaky test TestComponentBuildHashInDiagnostics #4219
Conversation
This pull request does not have a backport label. Could you fix it @AndersonQ? 🙏
NOTE: |
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
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.
One rewording and one nitpick (both non-blocking).
Looks good overall
isHealth, | ||
1*time.Minute, 10*time.Second, | ||
allHealthy, | ||
5*time.Minute, 10*time.Second, | ||
"agent did not became health. Last status: %v", &stateBuff) |
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.
"agent did not became health. Last status: %v", &stateBuff) | |
"agent never became healthy. Last status: %v", &stateBuff) |
state := client.State(c.State) | ||
if state != client.Healthy { | ||
allHealthy = false | ||
stateBuff.WriteString(fmt.Sprintf("%s not health, state: %s", |
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.
Nitpick: couldn't you just track the last status and dump that if the assertion fails? I understand that it would be bigger but it's a test and if it fails the more information we have, the better...
|
What does this PR do?
Makes the test integration test TestComponentBuildHashInDiagnostics to wait all components to be healthy after agent installation before proceeding with the test.
Why is it important?
The test is flaky on windows because the components take too long to be healthy and report back their
version_info
Checklist
[ ] I have commented my code, particularly in hard-to-understand areas[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added an entry in./changelog/fragments
using the changelog tool-~~ [ ] I have added an integration test or an E2E test~~
How to test this PR locally
Related issues
Questions to ask yourself