andyhuangdev opened a new pull request, #11511:
URL: https://github.com/apache/ozone/pull/11511

   ## What changes were proposed in this pull request?
   
   This PR fixes two Mockito checks that could pass even when the regressions 
they were intended to prevent were present.
   
   - TestCreatePipelineCommandHandler#testCommandIdempotency now verifies the 
three-argument addGroup overload used by the handler and injects the mocked 
Raft client, making both local and remote group creation checks effective.
   - TestECUnderReplicationHandler#testMaintenanceDoesNotRequestZeroNodes now 
verifies that the six-argument chooseDatanodes overload is called exactly once 
for decommission replication. Checking for a zero-node request would still miss 
the regression because the current maintenance path requests the number of 
maintenance indexes.
   
   Only tests and the related test comment are changed.
   
   ## What is the link to the Apache JIRA
   
   [HDDS-16942](https://issues.apache.org/jira/browse/HDDS-16942)
   
   ## How was this patch tested?
   
   - Temporarily bypassed the pipeline isExist check and confirmed the 
corrected idempotency test failed.
   - Temporarily removed the additionalMaintenanceCopiesNeeded == 0 guard and 
confirmed the corrected EC test failed because placement policy calls increased 
from one to two.
   - Restored production code and ran both affected test classes: all 44 tests 
passed.
   - Ran ./hadoop-ozone/dev-support/checks/checkstyle.sh: passed with zero 
violations.
   - Ran git diff --check: passed.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to