Skip to content

Commit 56c5c9e

Browse files
authored
HBASE-29937 Upgrade hbase-metrics-api to use junit5 (#7816)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
1 parent a568670 commit 56c5c9e

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

hbase-metrics-api/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,6 @@
8888
<artifactId>junit-jupiter-params</artifactId>
8989
<scope>test</scope>
9090
</dependency>
91-
<dependency>
92-
<groupId>org.junit.vintage</groupId>
93-
<artifactId>junit-vintage-engine</artifactId>
94-
<scope>test</scope>
95-
</dependency>
9691
<dependency>
9792
<groupId>org.slf4j</groupId>
9893
<artifactId>jcl-over-slf4j</artifactId>

hbase-metrics-api/src/test/java/org/apache/hadoop/hbase/metrics/TestMetricRegistriesLoader.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,24 @@
1717
*/
1818
package org.apache.hadoop.hbase.metrics;
1919

20-
import static org.junit.Assert.assertEquals;
21-
import static org.junit.Assert.assertNotEquals;
20+
import static org.junit.jupiter.api.Assertions.assertEquals;
21+
import static org.junit.jupiter.api.Assertions.assertNotEquals;
2222
import static org.mockito.Mockito.mock;
2323

24-
import org.apache.hadoop.hbase.HBaseClassTestRule;
2524
import org.apache.hadoop.hbase.testclassification.SmallTests;
26-
import org.junit.ClassRule;
27-
import org.junit.Test;
28-
import org.junit.experimental.categories.Category;
25+
import org.junit.jupiter.api.Tag;
26+
import org.junit.jupiter.api.Test;
2927

3028
import org.apache.hbase.thirdparty.com.google.common.collect.Lists;
3129

3230
/**
3331
* Test class for {@link MetricRegistriesLoader}.
3432
*/
35-
@Category(SmallTests.class)
33+
@Tag(SmallTests.TAG)
3634
public class TestMetricRegistriesLoader {
3735

38-
@ClassRule
39-
public static final HBaseClassTestRule CLASS_RULE =
40-
HBaseClassTestRule.forClass(TestMetricRegistriesLoader.class);
41-
4236
@Test
43-
public void testLoadSinleInstance() {
37+
public void testLoadSingleInstance() {
4438
MetricRegistries loader = mock(MetricRegistries.class);
4539
MetricRegistries instance = MetricRegistriesLoader.load(Lists.newArrayList(loader));
4640
assertEquals(loader, instance);

0 commit comments

Comments
 (0)