This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.6 by this push:
     new a8f93eb54a0 HBASE-29937 Upgrade hbase-metrics-api to use junit5 (#7816)
a8f93eb54a0 is described below

commit a8f93eb54a0d4b3f39277a3e66a133ecdda226f7
Author: Liu Xiao <[email protected]>
AuthorDate: Thu Mar 5 22:58:30 2026 +0800

    HBASE-29937 Upgrade hbase-metrics-api to use junit5 (#7816)
    
    Signed-off-by: Duo Zhang <[email protected]>
    (cherry picked from commit 56c5c9ee7e780f7981f4003dae568c6a93399f30)
---
 hbase-metrics-api/pom.xml                              |  5 -----
 .../hbase/metrics/TestMetricRegistriesLoader.java      | 18 ++++++------------
 2 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/hbase-metrics-api/pom.xml b/hbase-metrics-api/pom.xml
index 5c6e65f66fc..c1a5af10d41 100644
--- a/hbase-metrics-api/pom.xml
+++ b/hbase-metrics-api/pom.xml
@@ -88,11 +88,6 @@
       <artifactId>junit-jupiter-params</artifactId>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.junit.vintage</groupId>
-      <artifactId>junit-vintage-engine</artifactId>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>jcl-over-slf4j</artifactId>
diff --git 
a/hbase-metrics-api/src/test/java/org/apache/hadoop/hbase/metrics/TestMetricRegistriesLoader.java
 
b/hbase-metrics-api/src/test/java/org/apache/hadoop/hbase/metrics/TestMetricRegistriesLoader.java
index b9df823e756..83cdcbb2fca 100644
--- 
a/hbase-metrics-api/src/test/java/org/apache/hadoop/hbase/metrics/TestMetricRegistriesLoader.java
+++ 
b/hbase-metrics-api/src/test/java/org/apache/hadoop/hbase/metrics/TestMetricRegistriesLoader.java
@@ -17,30 +17,24 @@
  */
 package org.apache.hadoop.hbase.metrics;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
 import static org.mockito.Mockito.mock;
 
-import org.apache.hadoop.hbase.HBaseClassTestRule;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
 
 import org.apache.hbase.thirdparty.com.google.common.collect.Lists;
 
 /**
  * Test class for {@link MetricRegistriesLoader}.
  */
-@Category(SmallTests.class)
+@Tag(SmallTests.TAG)
 public class TestMetricRegistriesLoader {
 
-  @ClassRule
-  public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(TestMetricRegistriesLoader.class);
-
   @Test
-  public void testLoadSinleInstance() {
+  public void testLoadSingleInstance() {
     MetricRegistries loader = mock(MetricRegistries.class);
     MetricRegistries instance = 
MetricRegistriesLoader.load(Lists.newArrayList(loader));
     assertEquals(loader, instance);

Reply via email to