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

   ## What changes were proposed in this pull request?
   
   `TestHSync` had four no-op AssertJ calls of the form `assertThat(n == 
collection.size())`. `assertThat(boolean)` only builds an 
`AbstractBooleanAssert`, so those size checks never failed.
   
   They live in two tests:
   
   * `testHSyncOpenKeyCommitAfterExpiry`: after expire, `OpenKeyCleanupService` 
should commit the hsynced open key and delete the non-hsync one. The size 
checks are about this test's `key1`/`key2`, not the whole tables.
   * `testHSyncOpenKeyDeletionWhileDeleteDirectory`: after hsync, openFileTable 
should have that one open key before the directory is deleted.
   
   This class shares one static bucket and `getOpenKeyInfo` / `getKeyInfo` scan 
the entire layout. Turning the first test's checks into global `assertEquals` 
failed CI (`expected: <1> but was: <4>` on fileTable; [round 
1](https://github.com/shuan1026/ozone/actions/runs/33292933066/job/99208880146))
 because other tests leave committed keys behind. That is shared test state, 
not an hsync/cleanup product bug.
   
   This PR:
   
   * replaces all four no-ops with `assertEquals`, matching the rest of the file
   * scopes the three expiry-test counts with `filterByKeyName(..., key1, key2)`
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-16338
   
   ## How was this patch tested?
   
   - Round 1 (global table `assertEquals` only): failed 
`TestHSync.testHSyncOpenKeyCommitAfterExpiry`: 
https://github.com/shuan1026/ozone/actions/runs/33292933066/job/99208880146
   - Round 2 (with `filterByKeyName`): full fork CI: 
https://github.com/shuan1026/ozone/actions/runs/33299986156


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