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

[8.x](backport #43402) Fix flaky logstash output test #43459

Merged
merged 1 commit into from
Mar 25, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 24, 2025

Fix a flaky logstash output test for the deadlockListener. The old test used live time tickers and occasionally failed because timing on CI machines is highly variable. This PR refactors deadlockListener to allow tests to override the current time and the ticker channel, so the test can run deterministically in a single goroutine with no calls to time.Sleep.

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.next.asciidoc or CHANGELOG-developer.next.asciidoc.

This is an automatic backport of pull request #43402 done by [Mergify](https://mergify.com).

Fix a flaky logstash output test for the `deadlockListener`. The old test used live time tickers and occasionally failed because timing on CI machines is highly variable. This PR refactors `deadlockListener` to allow tests to override the current time and the ticker channel, so the test can run deterministically in a single goroutine with no calls to `time.Sleep`.

(cherry picked from commit 6d92a40)
@mergify mergify bot added the backport label Mar 24, 2025
@mergify mergify bot requested a review from a team as a code owner March 24, 2025 19:39
@mergify mergify bot requested review from mauri870 and faec and removed request for a team March 24, 2025 19:39
@mergify mergify bot assigned faec Mar 24, 2025
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Mar 24, 2025
@github-actions github-actions bot added flaky-test Unstable or unreliable test cases. Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team labels Mar 24, 2025
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Mar 24, 2025
@elasticmachine
Copy link
Collaborator

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

@pierrehilbert pierrehilbert merged commit 793542a into 8.x Mar 25, 2025
145 checks passed
@pierrehilbert pierrehilbert deleted the mergify/bp/8.x/pr-43402 branch March 25, 2025 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport flaky-test Unstable or unreliable test cases. 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.

3 participants