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


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCacheOnWriteInSchema.java:
##########
@@ -141,19 +131,15 @@ public TestCacheOnWriteInSchema(CacheOnWriteType cowType) 
{
     System.out.println(testDescription);
   }
 
-  @Parameters
-  public static Collection<Object[]> getParameters() {
-    List<Object[]> cowTypes = new ArrayList<>();
-    for (CacheOnWriteType cowType : CacheOnWriteType.values()) {
-      cowTypes.add(new Object[] { cowType });
-    }
-    return cowTypes;
+  public static Stream<Arguments> parameters() {
+    return Stream.of(CacheOnWriteType.values()).map(Arguments::of);
   }
 
-  @Before
-  public void setUp() throws IOException {
+  @BeforeEach
+  public void setUp(TestInfo testInfo) throws IOException {
+    this.name = testInfo.getTestMethod().get().getName();
     // parameterized tests add [#] suffix get rid of [ and ].
-    table = Bytes.toBytes(name.getMethodName().replaceAll("[\\[\\]]", "_"));
+    table = Bytes.toBytes(name.replaceAll("[\\[\\]]", "_"));
 

Review Comment:
   Done



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