Use logp.NewNopLogger for TestGenerateProcessorList#47316
Merged
Conversation
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.
Contributor
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
Contributor
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Contributor
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
khushijain21
approved these changes
Oct 24, 2025
9 tasks
mergify Bot
pushed a commit
that referenced
this pull request
Oct 24, 2025
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 Bot
pushed a commit
that referenced
this pull request
Oct 24, 2025
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)
This was referenced Oct 24, 2025
3 tasks
belimawr
added a commit
that referenced
this pull request
Oct 24, 2025
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) Co-authored-by: Tiago Queiroz <tiago.queiroz@elastic.co>
belimawr
added a commit
that referenced
this pull request
Oct 24, 2025
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) Co-authored-by: Tiago Queiroz <tiago.queiroz@elastic.co>
andrzej-stencel
pushed a commit
to andrzej-stencel/beats
that referenced
this pull request
Dec 1, 2025
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed commit message
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
I have commented my code, particularly in hard-to-understand areasI have made corresponding changes to the documentationI have made corresponding change to the default configuration filesI have added tests that prove my fix is effective or that my feature works. Where relevant, I have used thestresstest.shscript to run them under stress conditions and race detector to verify their stability.I have added an entry in./changelog/fragmentsusing the changelog tool.## Disruptive User Impact## Author's ChecklistHow to test this PR locally
## Related issues## Use cases## Screenshots## Logs