Copilot commented on code in PR #11666:
URL: https://github.com/apache/ozone/pull/11666#discussion_r4338242365


##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestOMMultiTenantManagerImpl.java:
##########
@@ -90,6 +94,8 @@ public void setUp() throws IOException {
    */
   @Test
   public void testReloadCache() throws IOException {
+    verify(omMetrics).setNumTenants(1);
+

Review Comment:
   These verifications don’t enforce call count or ordering, so the test can 
pass even if `setNumTenants(...)` is invoked multiple times or out of sequence. 
Consider using `InOrder` to assert `setNumTenants(1)` happens before 
constructing `tenantManager2` and `setNumTenants(3)` happens after, and/or use 
`times(1)` to make the expectation strict.



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