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


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestRestoreSnapshotHelper.java:
##########
@@ -395,13 +390,13 @@ private void verifyRestore(final Path rootDir, final 
TableDescriptor sourceHtd,
     for (int i = 0; i < files.size(); i += 2) {
       String linkFile = files.get(i);
       String refFile = files.get(i + 1);
-      assertTrue(linkFile + " should be a HFileLink", 
HFileLink.isHFileLink(linkFile));
-      assertTrue(refFile + " should be a Referene", 
StoreFileInfo.isReference(refFile));
+      assertTrue(HFileLink.isHFileLink(linkFile), linkFile + " should be a 
HFileLink");
+      assertTrue(StoreFileInfo.isReference(refFile), refFile + " should be a 
Referene");
       assertEquals(sourceHtd.getTableName(), 
HFileLink.getReferencedTableName(linkFile));

Review Comment:
   Typo in assertion message: "Referene" should be "Reference".



##########
hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestSnapshotWhenChoreCleaning.java:
##########
@@ -156,10 +147,10 @@ public void testSnapshotWhenSnapshotHFileCleanerRunning() 
throws Exception {
     }
 
     TEST_UTIL.getAdmin().snapshot("snapshotName_prev", TABLE_NAME);
-    
Assert.assertEquals(Lists.newArrayList(cleaner.getDeletableFiles(files)).size(),
 0);
+    assertEquals(Lists.newArrayList(cleaner.getDeletableFiles(files)).size(), 
0);
     TEST_UTIL.getAdmin().deleteSnapshot("snapshotName_prev");
     cleaner.getFileCacheForTesting().triggerCacheRefreshForTesting();
-    
Assert.assertEquals(Lists.newArrayList(cleaner.getDeletableFiles(files)).size(),
 100);
+    assertEquals(Lists.newArrayList(cleaner.getDeletableFiles(files)).size(), 
100);

Review Comment:
   JUnit Jupiter's assertEquals expects (expected, actual). These assertions 
currently pass the computed size as the expected value and the constant as the 
actual value, which makes failures harder to interpret. Swap the arguments so 
the constant is expected and the computed size is actual.



##########
hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestConcurrentFlushSnapshotFromClient.java:
##########
@@ -18,28 +18,23 @@
 package org.apache.hadoop.hbase.snapshot;
 
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseClassTestRule;
 import org.apache.hadoop.hbase.master.snapshot.SnapshotManager;
 import org.apache.hadoop.hbase.testclassification.ClientTests;
-import org.apache.hadoop.hbase.testclassification.MediumTests;
-import org.junit.BeforeClass;
-import org.junit.ClassRule;
-import org.junit.experimental.categories.Category;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Tag;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@Category({ ClientTests.class, MediumTests.class })
+@Tag(ClientTests.TAG)
 public class TestConcurrentFlushSnapshotFromClient extends 
TestFlushSnapshotFromClient {
   private static final Logger LOG = 
LoggerFactory.getLogger(TestFlushSnapshotFromClient.class);

Review Comment:
   This test previously carried both ClientTests and MediumTests 
classifications (JUnit4 @Category). After the migration it only has 
@Tag(ClientTests.TAG), which changes how the test is selected/executed. Please 
add back the missing @Tag(MediumTests.TAG) to preserve the prior classification.



##########
hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestMobRestoreFlushSnapshotFromClient.java:
##########
@@ -37,19 +34,17 @@
  * TestRestoreSnapshotFromClient. This is worth refactoring this because there 
will be a few more
  * flavors of snapshots that need to run these tests.
  */
-@Category({ ClientTests.class, LargeTests.class })
+@Tag(ClientTests.TAG)
 public class TestMobRestoreFlushSnapshotFromClient extends 
TestRestoreFlushSnapshotFromClient {

Review Comment:
   This test previously carried both ClientTests and LargeTests classifications 
(JUnit4 @Category). After the migration it only has @Tag(ClientTests.TAG), 
which changes how the test is selected/executed. Please add back the missing 
@Tag(LargeTests.TAG) to preserve the prior classification.



##########
hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestMobFlushSnapshotFromClient.java:
##########
@@ -39,19 +36,17 @@
  * TestSnapshotFromClient. This is worth refactoring this because there will 
be a few more flavors
  * of snapshots that need to run these tests.
  */
-@Category({ ClientTests.class, MediumTests.class })
+@Tag(ClientTests.TAG)
 public class TestMobFlushSnapshotFromClient extends 
TestFlushSnapshotFromClient {
 

Review Comment:
   This test previously carried both ClientTests and MediumTests 
classifications (JUnit4 @Category). After the migration it only has 
@Tag(ClientTests.TAG), which changes how the test is selected/executed. Please 
add back the missing @Tag(MediumTests.TAG) to preserve the prior classification.



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