Skip to content

[ISSUE #11611] Add regression tests for StatisticsBriefInterceptor - #11612

Merged
ShannonDing merged 1 commit into
apache:developfrom
Yuanhong-Zheng:tests/statistics-brief-interceptor
Nov 25, 2026
Merged

ShannonDing merged 1 commit into
apache:developfrom
Yuanhong-Zheng:tests/statistics-brief-interceptor

Conversation

@Yuanhong-Zheng

@Yuanhong-Zheng Yuanhong-Zheng commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Which Issue(s) This PR Fixes

Brief Description

Add JUnit coverage for StatisticsBriefInterceptor. The tests verify that named values reach the corresponding summary when configured in a different order from the statistics item, missing values are skipped, unknown names are rejected, and resetting the interceptor begins a new sampling interval for every configured summary.

How Did You Test This Change?

  • Ran mvn -B -ntp -pl common -am -Dtest=StatisticsBriefInterceptorTest,StatisticsBriefTest -Dsurefire.failIfNoSpecifiedTests=false test. The build passed with 11 tests, no failures, and no Checkstyle violations.
  • Compiled the interceptor, its supporting statistics classes, and both test classes with JDK 17 using javac --release 8 -Xlint:all -Werror.
  • Ran StatisticsBriefInterceptorTest and StatisticsBriefTest with JUnit 4.13.2. All 11 tests passed.
  • In isolated copies, independently reversed each of the four behaviors and verified that its corresponding new test failed.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.49%. Comparing base (74c2a8e) to head (5366340).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #11612      +/-   ##
=============================================
+ Coverage      50.47%   50.49%   +0.02%     
- Complexity     14711    14725      +14     
=============================================
  Files           1391     1391              
  Lines         103541   103541              
  Branches       13575    13575              
=============================================
+ Hits           52261    52287      +26     
+ Misses         45042    45014      -28     
- Partials        6238     6240       +2     

☔ View full report in Codecov by Harness.
📢 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.

@ShannonDing
ShannonDing merged commit 5962596 into apache:develop Nov 25, 2026
10 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.

[Enhancement] Add regression tests for StatisticsBriefInterceptor

3 participants