Copilot commented on code in PR #8064:
URL: https://github.com/apache/hbase/pull/8064#discussion_r3084017372
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/master/http/TestApiV1ClusterMetricsResource.java:
##########
@@ -131,10 +139,6 @@ protected void after() {
}
Review Comment:
`afterAll` deletes a hard-coded table named "test", but `beforeAll` creates
a table named after `TestApiV1ClusterMetricsResource.class.getSimpleName()`.
This will leak the created table and may delete an unrelated one. Delete the
`tableName` field (or track the created table) instead.
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/master/http/TestHbckMetricsResource.java:
##########
@@ -263,10 +269,6 @@ protected void after() {
}
Review Comment:
`afterAll` is deleting a hard-coded table named "test", but `beforeAll`
creates a table named after `TestHbckMetricsResource.class.getSimpleName()`.
This cleanup will leave the created table behind (and may attempt to delete an
unrelated table). Use the `tableName` field (or otherwise track the created
table) for deletion in `afterAll`.
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestBalancerStatusTagInJMXMetrics.java:
##########
@@ -17,34 +17,30 @@
*/
package org.apache.hadoop.hbase.master.balancer;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import java.util.Random;
import java.util.concurrent.ThreadLocalRandom;
import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.HBaseTestingUtility;
import org.apache.hadoop.hbase.MiniHBaseCluster;
import org.apache.hadoop.hbase.master.HMaster;
import org.apache.hadoop.hbase.testclassification.MediumTests;
+import org.apache.hadoop.hbase.testclassification.MiscTests;
import org.apache.hadoop.metrics2.MetricsSource;
import org.apache.hadoop.metrics2.MetricsTag;
import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-@Category({ MediumTests.class })
+@Tag(MiscTests.TAG)
+@Tag(MediumTests.TAG)
public class TestBalancerStatusTagInJMXMetrics extends BalancerTestBase {
Review Comment:
This test was previously categorized only as `MediumTests`, but now it is
tagged with both `MiscTests` and `MediumTests`. Unless there is an intentional
reclassification, drop the extra `MiscTests` tag to preserve the original test
classification semantics.
--
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]