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

Fix flaky TestCoordinatorReportsInvalidPolicy #4402

Conversation

AndersonQ
Copy link
Member

What does this PR do?

Fixes flakyness of TestCoordinatorReportsInvalidPolicy by increasing the state change timeout, failing fast and having better error messages and printing the coordinator logs if the test fails.

Why is it important?

The test is flaky

Checklist

  • My code follows the style guidelines of this project
  • [ ] 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 tests that prove my fix is effective or that my feature works
  • [ ] 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

  • N/A

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

@AndersonQ AndersonQ added Team:Elastic-Agent Label for the Agent team flaky-test Unstable or unreliable test cases. skip-changelog backport-v8.13.0 Automated backport with mergify labels Mar 12, 2024
@AndersonQ AndersonQ self-assigned this Mar 12, 2024
@AndersonQ AndersonQ requested a review from a team as a code owner March 12, 2024 14:28
@elasticmachine
Copy link
Contributor

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

@AndersonQ AndersonQ force-pushed the 4117-still-flaky-TestCoordinatorReportsInvalidPolicy branch from d8d754d to f82f292 Compare March 13, 2024 14:28
@AndersonQ AndersonQ requested a review from cmacknz March 21, 2024 12:06
@AndersonQ
Copy link
Member Author

@cmacknz I fixed the case statement, could you re-review it?

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
0.0% 0.0% Duplication on New Code

See analysis details on SonarQube

@AndersonQ AndersonQ merged commit fc67134 into elastic:main Mar 22, 2024
9 checks passed
@AndersonQ AndersonQ deleted the 4117-still-flaky-TestCoordinatorReportsInvalidPolicy branch March 22, 2024 06:41
mergify bot pushed a commit that referenced this pull request Mar 22, 2024
* increase state change timeout, fail fast and better error messages
* print coordinator logs on failure

(cherry picked from commit fc67134)
pierrehilbert pushed a commit that referenced this pull request Mar 22, 2024
* increase state change timeout, fail fast and better error messages
* print coordinator logs on failure

(cherry picked from commit fc67134)

Co-authored-by: Anderson Queiroz <anderson.queiroz@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.13.0 Automated backport with mergify flaky-test Unstable or unreliable test cases. skip-changelog Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Flaky Test]: TestCoordinatorReportsInvalidPolicy – Vars change should cause state update
3 participants