liuxiaocs7 commented on code in PR #8151:
URL: https://github.com/apache/hbase/pull/8151#discussion_r3155269944


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALCellCodecWithCompression.java:
##########
@@ -17,78 +17,71 @@
  */
 package org.apache.hadoop.hbase.regionserver.wal;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.stream.Stream;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.ArrayBackedTag;
 import org.apache.hadoop.hbase.ByteBufferKeyValue;
-import org.apache.hadoop.hbase.HBaseClassTestRule;
 import org.apache.hadoop.hbase.HBaseCommonTestingUtil;
+import org.apache.hadoop.hbase.HBaseParameterizedTestTemplate;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.PrivateCellUtil;
-import org.apache.hadoop.hbase.Tag;
 import org.apache.hadoop.hbase.codec.Codec.Decoder;
 import org.apache.hadoop.hbase.codec.Codec.Encoder;
 import org.apache.hadoop.hbase.io.compress.Compression;
 import org.apache.hadoop.hbase.io.util.LRUDictionary;
 import org.apache.hadoop.hbase.testclassification.RegionServerTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.junit.ClassRule;
-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.Parameters;
-
-@Category({ RegionServerTests.class, SmallTests.class })
-@RunWith(Parameterized.class)
-public class TestWALCellCodecWithCompression {
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.TestTemplate;
+import org.junit.jupiter.params.provider.Arguments;
 
-  @ClassRule
-  public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(TestWALCellCodecWithCompression.class);
+@Tag(RegionServerTests.TAG)
+@Tag(SmallTests.TAG)
+@HBaseParameterizedTestTemplate
+public class TestWALCellCodecWithCompression {
 
-  private Compression.Algorithm compression;
+  private final Compression.Algorithm compression;
 
   public TestWALCellCodecWithCompression(Compression.Algorithm algo) {
     this.compression = algo;
   }
 
-  @Parameters
-  public static List<Object[]> params() {
-    return HBaseCommonTestingUtil.COMPRESSION_ALGORITHMS_PARAMETERIZED;
+  public static Stream<Arguments> parameters() {
+    return 
HBaseCommonTestingUtil.COMPRESSION_ALGORITHMS_PARAMETERIZED.stream().map(Arguments::of);
   }
 
-  @Test
+  @TestTemplate
   public void testEncodeDecodeKVsWithTags() throws Exception {
     doTest(false, false);
   }
 
-  @Test
+  @TestTemplate
   public void testEncodeDecodeKVsWithTagsWithTagsCompression() throws 
Exception {
     doTest(true, false);
   }
 
-  @Test
+  @TestTemplate
   public void testEncodeDecodeOffKVsWithTagsWithTagsCompression() throws 
Exception {
     doTest(true, false);
   }

Review Comment:
   see: HBASE-30128 and https://github.com/apache/hbase/pull/8158



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