Skip to content

Updated topic tests logging configuration#640

Merged
alex268 merged 3 commits intoydb-platform:masterfrom
alex268:master
Apr 22, 2026
Merged

Updated topic tests logging configuration#640
alex268 merged 3 commits intoydb-platform:masterfrom
alex268:master

Conversation

@alex268
Copy link
Copy Markdown
Member

@alex268 alex268 commented Apr 22, 2026

No description provided.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.85%. Comparing base (c069b4e) to head (1acdd7d).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #640      +/-   ##
============================================
- Coverage     70.86%   70.85%   -0.01%     
- Complexity     3310     3313       +3     
============================================
  Files           374      374              
  Lines         15699    15699              
  Branches       1650     1650              
============================================
- Hits          11125    11124       -1     
- Misses         3929     3930       +1     
  Partials        645      645              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pnv1 pnv1 requested a review from Copilot April 22, 2026 10:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates Topic module test logging to be less noisy and more consistent by centralizing temporary log suppression and adjusting log levels.

Changes:

  • Update test log4j2.xml pattern/layout and tweak logger levels (e.g., tech.ydb to info).
  • Introduce @HideLoggers + HideLoggersRule to silence specific noisy loggers during selected JUnit4 tests.
  • Reduce verbosity in writer implementation logs (debugtrace) and change write-session close logging.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
topic/src/test/resources/log4j2.xml Adjusts test logging format and default logger levels to reduce noise.
topic/src/test/java/tech/ydb/topic/write/impl/WriterQueueTest.java Replaces ad-hoc log silencing with @HideLoggers + rule.
topic/src/test/java/tech/ydb/topic/utils/HideLoggersRule.java Adds JUnit4 TestRule to temporarily turn off specified loggers per test method.
topic/src/test/java/tech/ydb/topic/utils/HideLoggers.java Adds method-level annotation to declare loggers to hide for a test.
topic/src/test/java/tech/ydb/topic/impl/TopicRetryableStreamTest.java Uses the new logger-hiding rule for a noisy test.
topic/src/test/java/tech/ydb/topic/impl/SerialExecutorTest.java Uses the new logger-hiding rule for tests that intentionally trigger warnings/errors.
topic/src/test/java/tech/ydb/topic/YdbTopicsIntegrationTest.java Fixes package declaration to match directory structure.
topic/src/test/java/tech/ydb/topic/YdbTopicsCodecIntegrationTest.java Fixes package + migrates log silencing to @HideLoggers/rule.
topic/src/test/java/tech/ydb/topic/TopicReadersIntegrationTest.java Fixes package + migrates log silencing to @HideLoggers/rule.
topic/src/main/java/tech/ydb/topic/write/impl/WriterQueue.java Lowers per-message “prepare sent message” logging to trace.
topic/src/main/java/tech/ydb/topic/write/impl/WriteSession.java Lowers ack logging to trace and changes close logging to info.
Comments suppressed due to low confidence (4)

topic/src/test/java/tech/ydb/topic/TopicReadersIntegrationTest.java:5

  • TopicReadersIntegrationTest now imports tech.ydb.topic.YdbTopicsIntegrationTest before the java.*/org.* imports. This violates the project's Checkstyle ImportOrder configuration (java/javax first, then third-party, then tech.ydb), and the import itself is redundant because the class is in the same package after the package rename. Consider removing this import and using TopicReadersIntegrationTest.class (or fully qualifying only where needed) so imports can follow the enforced order.
    topic/src/test/java/tech/ydb/topic/YdbTopicsCodecIntegrationTest.java:42
  • The tech.ydb.topic.utils.HideLoggers import is placed after tech.ydb.topic.write.* imports, which is out of order for the project's Checkstyle ImportOrder (imports must be sorted within the tech.ydb group). Please reorder the tech.ydb.* imports so tech.ydb.topic.utils.* comes before tech.ydb.topic.write.*.
    topic/src/test/java/tech/ydb/topic/YdbTopicsIntegrationTest.java:3
  • After changing the package to tech.ydb.topic, any imports from the same package (e.g., import tech.ydb.topic.TopicClient;) become redundant and may fail Checkstyle's RedundantImport rule if test sources are included in the Checkstyle run. Please remove same-package imports and rely on simple type names instead.
    topic/src/test/java/tech/ydb/topic/YdbTopicsCodecIntegrationTest.java:4
  • After changing the package to tech.ydb.topic, imports from that same package (e.g., TopicClient) become redundant. If Checkstyle is run on test sources, RedundantImport will fail; please remove same-package imports and rely on simple names.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread topic/src/main/java/tech/ydb/topic/write/impl/WriteSession.java
@alex268 alex268 merged commit 8556216 into ydb-platform:master Apr 22, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants