Skip to content

Conversation

@orestisfl
Copy link
Contributor

Proposed commit message

metricbeat wrapper is leaking a goroutine causing the test to fail because it's logging a message after the test is over.

Wait for worker to shutdown before returning.

Similar to #47660 which fixed the same issue for TestPeriodIsAddedToEvent.
Similar to #47663 which fixed the same issue for TestGenerateProcessorList.

Closes #47776

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. Where relevant, I have used the stresstest.sh script to run them under stress conditions and race detector to verify their stability.
  • I have added an entry in ./changelog/fragments using the changelog tool.

How to test this PR locally

go test -v -count=1000 -run "TestDurationIsAddedToEvent" ./metricbeat/mb/module/

Related issues

metricbeat wrapper is leaking a goroutine causing the test to fail
because it's logging a message after the test is over.

Wait for worker to shutdown before returning.

Similar to elastic#47660 which fixed the same issue for TestPeriodIsAddedToEvent.
Similar to elastic#47663 which fixed the same issue for TestGenerateProcessorList.

Closes elastic#47776
@orestisfl orestisfl requested a review from kruskall November 28, 2025 11:04
@orestisfl orestisfl self-assigned this Nov 28, 2025
@orestisfl orestisfl added bug flaky-test Unstable or unreliable test cases. labels Nov 28, 2025
@orestisfl orestisfl requested a review from a team as a code owner November 28, 2025 11:04
@orestisfl orestisfl added release-note:skip The PR should be ignored when processing the changelog backport-skip Skip notification from the automated backport with mergify Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team labels Nov 28, 2025
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 28, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 28, 2025
@github-actions
Copy link
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@orestisfl orestisfl added skip-changelog backport-active-all Automated backport with mergify to all the active branches and removed release-note:skip The PR should be ignored when processing the changelog backport-skip Skip notification from the automated backport with mergify labels Nov 28, 2025
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 bug flaky-test Unstable or unreliable test cases. skip-changelog Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Flaky Test] ExampleWrapper - Log in goroutine after TestDurationIsAddedToEvent has completed

2 participants