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


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/TimestampTestBase.java:
##########
@@ -147,10 +148,10 @@ public static void assertVersions(final Table incommon, 
final long[] tss) throws
     get.readVersions(kvs.length - 1);
     result = incommon.get(get);
     kvs = result.rawCells();
-    Assertions.assertEquals(kvs.length, tss.length - 1);
+    assertEquals(kvs.length, tss.length - 1);

Review Comment:
   `assertEquals` argument order is reversed here (actual first). JUnit uses 
(expected, actual), so swap them to make failures easier to interpret.



##########
hbase-server/src/test/java/org/apache/hadoop/hbase/TimestampTestBase.java:
##########
@@ -104,9 +105,9 @@ private static void assertOnlyLatest(final Table incommon, 
final long currentTim
     get.addColumn(FAMILY_NAME, QUALIFIER_NAME);
     get.readVersions(3);
     Result result = incommon.get(get);
-    Assertions.assertEquals(1, result.size());
+    assertEquals(1, result.size());
     long time = Bytes.toLong(CellUtil.cloneValue(result.rawCells()[0]));
-    Assertions.assertEquals(time, currentTime);
+    assertEquals(time, currentTime);

Review Comment:
   `assertEquals` in JUnit expects (expected, actual). Here the arguments are 
reversed, which will produce confusing failure messages (expected/actual 
swapped). Swap the arguments for clearer diagnostics.



##########
hbase-server/src/test/java/org/apache/hadoop/hbase/TimestampTestBase.java:
##########
@@ -131,10 +132,10 @@ public static void assertVersions(final Table incommon, 
final long[] tss) throws
     get.readVersions(tss.length);
     Result result = incommon.get(get);
     Cell[] kvs = result.rawCells();
-    Assertions.assertEquals(kvs.length, tss.length);
+    assertEquals(kvs.length, tss.length);

Review Comment:
   `assertEquals` argument order is reversed here (actual first). JUnit uses 
(expected, actual), so swap them to make failures easier to interpret.



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