Repository navigation
[ISSUE #10373] Bound stats test waits and clean up executors - #11485
Open
weidong-qi wants to merge 1 commit into
Open
weidong-qi wants to merge 1 commit into
weidong-qi wants to merge 1 commit into
Conversation
Wait on submitted task futures so worker failures reach the test and waits have a timeout. Shut down both executors in teardown to prevent scheduled-thread leaks. Related to apache#10373. Assisted-by: OpenAI Codex
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #11485 +/- ##
=============================================
- Coverage 49.79% 49.73% -0.06%
+ Complexity 14387 14369 -18
=============================================
Files 1390 1390
Lines 103264 103264
Branches 13504 13504
=============================================
- Hits 51419 51360 -59
- Misses 45657 45702 +45
- Partials 6188 6202 +14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Which Issue(s) This PR Addresses
Related to #10373, specifically the work on unnecessary sleeps and resource cleanup. This PR addresses StatsItemSetTest only.
Brief Description
StatsItemSetTest currently polls getCompletedTaskCount() without a timeout and discards the futures returned by submit(). Worker exceptions can therefore go unnoticed when the resulting values still satisfy the assertions. The scheduled executor created by each test is also not shut down.
This change:
The existing statistics assertions and production code are unchanged.
How Did You Test This Change?
Local environment: macOS arm64, Amazon Corretto 8u504, Maven 3.9.11.
Focused tests:
mvn -B -pl common -am -Dtest=StatsItemSetTest -Dsurefire.failIfNoSpecifiedTests=false -Djacoco.skip=true test
Result: all 3 tests passed. Checkstyle reported zero violations.
Common module tests:
mvn -B -pl common -am -Djacoco.skip=true test
Result: all 267 tests passed, with no failures, errors, or skipped tests.
Additional checks using an out-of-tree JUnitCore probe:
The generated test class uses Java 8 class-file version 52. JaCoCo was skipped, consistent with the repository's macOS CI configuration. The full multi-module package build, integration tests, and Linux/Windows runs were not performed locally.
Assisted-by: OpenAI Codex