Copilot commented on code in PR #8209:
URL: https://github.com/apache/hbase/pull/8209#discussion_r3210904064


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestStoreHotnessProtector.java:
##########
@@ -102,10 +96,9 @@ public void testPreparePutCounter() throws Exception {
 
     countDownLatch.await(60, TimeUnit.SECONDS);
     // no exception
-    Assert.assertEquals(exception.get(), null);
-    
Assert.assertEquals(storeHotnessProtector.getPreparePutToStoreMap().size(), 1);
-    
Assert.assertEquals(storeHotnessProtector.getPreparePutToStoreMap().get(family).get(),
-      threadCount);
+    assertEquals(exception.get(), null);
+    assertEquals(storeHotnessProtector.getPreparePutToStoreMap().size(), 1);
+    
assertEquals(storeHotnessProtector.getPreparePutToStoreMap().get(family).get(), 
threadCount);
 

Review Comment:
   Several `assertEquals` calls have the arguments reversed (e.g., 
`assertEquals(exception.get(), null)` and `assertEquals(map.size(), 1)`). These 
still work, but they produce confusing failure output because JUnit treats the 
first argument as the expected value. Prefer `assertNull(exception.get())` and 
`assertEquals(1, map.size())` (expected-first) for clearer diagnostics.



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

Reply via email to