j1wonpark opened a new pull request, #4332:
URL: https://github.com/apache/amoro/pull/4332
## Why are the changes needed?
`TestOptimizerScaleKeeper.testScaleDownRespectsFloor` intermittently failed
with `expected: <1> but was: <2>`.
The test created a DRA group with an unmet `min-parallelism` floor and then
manually registered an optimizer. Group creation queues an immediate
scale-keeper round, and floor recovery is intentionally not delayed by the
configured scaling cadence. Depending on thread scheduling, the background
keeper could register one optimizer before the test registered another.
This is a test setup race rather than a failure in the production scale-down
logic.
## Brief change log
- Create the test DRA group with `min-parallelism=0`.
- Raise the floor to `1` after the test optimizer is registered.
- Assert that the live scale keeper does not trigger an unexpected scale-out
during setup.
## How was this patch tested?
- [x] Add some test cases that check the changes thoroughly including
negative and positive cases if possible
- Reproduced the original failure deterministically: `expected: <1> but
was: <2>`.
- `TestOptimizerScaleKeeper`: 20 tests passed.
- `testScaleDownRespectsFloor`: passed 10 consecutive runs.
- [ ] Add screenshots for manual tests if appropriate
Not applicable because this is a test-only change.
- [x] Run test locally before making a pull request
- `./mvnw -o -pl amoro-ams -DskipTests validate`
- Spotless and Checkstyle passed.
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
--
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]