Skip to content

Conversation

@swiatekm
Copy link
Contributor

@swiatekm swiatekm commented Sep 18, 2025

What does this PR do?

Improves the observability and resource cleanup in the TestBeatsReceiverLogs integration test. This test is somewhat unusual in that it wants to run agent twice with different configurations, verifying that the emitted logs are the same. Our integration test fixtures don't support that very well, so we instead prepare two separate fixtures for each execution. This, however, prevented us from calling fixture.Install, which does a lot of nice things, including cleanup and collection of diagnostics if the test fails. This change ensures that the same cleanup is applied to TestBeatsReceiverLogs.

Why is it important?

This test can be flaky sometimes, and it's difficult to understand the reason without diagnostics.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • 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

Related issues

@swiatekm swiatekm added flaky-test Unstable or unreliable test cases. skip-changelog backport-active-all Automated backport with mergify to all the active branches labels Sep 18, 2025
@swiatekm swiatekm force-pushed the test/unskip-testbeatsreceiver-logs branch from 0951003 to f88ebb9 Compare September 18, 2025 17:22
@elastic-sonarqube
Copy link

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

History

cc @swiatekm

@swiatekm swiatekm added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Sep 19, 2025
@swiatekm swiatekm marked this pull request as ready for review September 19, 2025 10:03
@swiatekm swiatekm requested a review from a team as a code owner September 19, 2025 10:03
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

Copy link
Member

@cmacknz cmacknz left a comment

Choose a reason for hiding this comment

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

The test could probably be rewritten to make a config change to beats receivers in the same agent to avoid having to bypass the fixture install step, but this LGTM as a way to debug the test as is.

@swiatekm
Copy link
Contributor Author

swiatekm commented Oct 7, 2025

Closing in favor of #10153.

@swiatekm swiatekm closed this Oct 7, 2025
@swiatekm swiatekm deleted the test/unskip-testbeatsreceiver-logs branch October 7, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-all Automated backport with mergify to all the active branches flaky-test Unstable or unreliable test cases. skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Flaky Test]: TestBeatsReceiverLogs – Error: Condition never satisfied

5 participants