PoiBlackTea opened a new pull request, #1119:
URL: https://github.com/apache/yunikorn-core/pull/1119
## Description
The resetQueue() function only cleared state on the specified queue, but
did not recursively reset its child queues. As a result, child queues retained
leftover allocatedResource values across subtests in
TestQuotaChangeTryPreemptionForParentQueue.
This PR updates resetQueue() to recursively clear child queues, aligns
assertQuotaPreemptionEvent()` with production event emission logic
(selectedVictims > 0), and corrects the expected claimedResources in Subtest 2.
Note: The primary flaky root cause (where `createVictim` offsets crossed
hour boundaries during `HH:04:00~HH:04:59` due to `time.Hour` truncation) was
already resolved in [#1118](https://github.com/apache/yunikorn-core/pull/1118).
This PR fixes the additional subtest state leakage discovered during
investigation to ensure test reliability.
### Type of change
Please delete options that are not relevant.
- [X] Bug Fix
- [ ] Improvement
- [ ] Feature
- [ ] Refactoring
- [ ] Documentation
### Jira issue
Jira ID : https://issues.apache.org/jira/browse/YUNIKORN-3335
- [ ] I have created a Jira issue for this pull request.
- [X] The Jira ID is part of the title of this pull request.
### AI Tooling
If an AI tool was used:
- [X] The PR includes the phrase "Generated by Antigravity IDE", where
Antigravity IDE is the name of the AI tool used.
- [X] My use of AI contributions follows the ASF legal policy.
Check https://www.apache.org/legal/generative-tooling.html for details.
### How has this been tested?
- [ ] New unit tests were added to cover new or changed code paths.
- [X] `make test_all` was run, and no failures reported.
- [ ] A pull request will be opened for new e2e tests
(apache/yunikorn-k8shim repository).
### Questions:
- [ ] The change needs documentation, a pull request for
apache/yunikorn-site repository will be created.
- [ ] There is breaking changes for older versions: jira is tagged with
`release-notes` label.
- [ ] The licenses files needs to be updated.
### Screenshots or other details
N/A
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]