Apache9 commented on code in PR #8199:
URL: https://github.com/apache/hbase/pull/8199#discussion_r3215005304


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPerColumnFamilyFlush.java:
##########
@@ -369,7 +363,7 @@ private void doTestLogReplay() throws Exception {
 
       Pair<HRegion, HRegionServer> desiredRegionAndServer = 
getRegionWithName(TABLENAME);
       HRegion desiredRegion = desiredRegionAndServer.getFirst();
-      assertTrue("Could not find a region which hosts the new region.", 
desiredRegion != null);
+      assertTrue(desiredRegion != null, "Could not find a region which hosts 
the new region.");

Review Comment:
   assertNotNull



##########
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestParallelPut.java:
##########
@@ -228,7 +221,7 @@ public void run() {
           assertEquals(OperationStatusCode.SUCCESS, 
ret[0].getOperationStatusCode());
           assertGet(this.region, rowkey, fam1, qual1, value);
         } catch (IOException e) {
-          assertTrue("Thread id " + threadNumber + " operation " + i + " 
failed.", false);
+          assertTrue(false, "Thread id " + threadNumber + " operation " + i + 
" failed.");

Review Comment:
   Just use fail?



##########
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicasWithModifyTable.java:
##########
@@ -17,67 +17,63 @@
  */
 package org.apache.hadoop.hbase.regionserver;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.io.IOException;
-import java.util.Arrays;
-import java.util.List;
+import java.util.stream.Stream;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseClassTestRule;
 import org.apache.hadoop.hbase.HBaseTestingUtil;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.TableNameTestRule;
 import org.apache.hadoop.hbase.client.TableDescriptor;
 import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
 import org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.apache.hadoop.hbase.testclassification.RegionServerTests;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.RegionSplitter;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameter;
-import org.junit.runners.Parameterized.Parameters;
-
-@RunWith(Parameterized.class)
-@Category({ RegionServerTests.class, MediumTests.class })
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInfo;
+import org.junit.jupiter.params.Parameter;
+import org.junit.jupiter.params.ParameterizedClass;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+@Tag(RegionServerTests.TAG)
+@Tag(MediumTests.TAG)
+@ParameterizedClass(name = "{index}: disableBeforeModifying={0}")

Review Comment:
   Use HBaseParameterizedTemplate? IIRC ParameterizedClass is not like 
Parameterized in JUnit4...



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