Skip to content

[9.2](backport #47316) Use logp.NewNopLogger for TestGenerateProcessorList#47320

Merged
belimawr merged 1 commit into
9.2from
mergify/bp/9.2/pr-47316
Oct 24, 2025
Merged

[9.2](backport #47316) Use logp.NewNopLogger for TestGenerateProcessorList#47320
belimawr merged 1 commit into
9.2from
mergify/bp/9.2/pr-47316

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Oct 24, 2025

Proposed commit message

Because logptest.NewTestingLogger uses the testing.T as the output for the logger, it could happen that the processors would log after the test had ended, leading to a panic.

This commit fixes it by using a no-op logger instead.

Example of the test failing: https://buildkite.com/elastic/beats-libbeat/builds/22486/steps/canvas?jid=019a1301-63ab-498b-b294-88e04f93bd9d#019a1301-63ab-498b-b294-88e04f93bd9d/210-617

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.

## Disruptive User Impact
## Author's Checklist

How to test this PR locally

cd libbeat/publisher/processing
go test -v -count=1 -run=TestGenerateProcessorList .

## Related issues
## Use cases
## Screenshots
## Logs


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

Because logptest.NewTestingLogger uses the testing.T as the output for
the logger, it could happen that the processors would log after the
test had ended, leading to a panic.

This commit fixes it by using a no-op logger instead.

(cherry picked from commit 34f3c91)
@mergify mergify Bot requested a review from a team as a code owner October 24, 2025 13:43
@mergify mergify Bot added the backport label Oct 24, 2025
@mergify mergify Bot requested review from AndersonQ and belimawr and removed request for a team October 24, 2025 13:43
@botelastic botelastic Bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 24, 2025
@github-actions
Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

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

@github-actions github-actions Bot added Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team skip-changelog labels Oct 24, 2025
@elasticmachine
Copy link
Copy Markdown
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 Oct 24, 2025
@belimawr belimawr merged commit dc3bf93 into 9.2 Oct 24, 2025
212 checks passed
@belimawr belimawr deleted the mergify/bp/9.2/pr-47316 branch October 24, 2025 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants