Copilot commented on code in PR #8240:
URL: https://github.com/apache/hbase/pull/8240#discussion_r3247270347
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSimpleTimeRangeTracker.java:
##########
@@ -17,29 +17,24 @@
*/
package org.apache.hadoop.hbase.regionserver;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.DataOutputStream;
import java.io.IOException;
-import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.io.ByteArrayOutputStream;
import org.apache.hadoop.hbase.io.TimeRange;
+import org.apache.hadoop.hbase.testclassification.MediumTests;
import org.apache.hadoop.hbase.testclassification.RegionServerTests;
-import org.apache.hadoop.hbase.testclassification.SmallTests;
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
-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;
-@Category({ RegionServerTests.class, SmallTests.class })
+@Tag(RegionServerTests.TAG)
+@Tag(MediumTests.TAG)
Review Comment:
The test classification was changed from `SmallTests` to `MediumTests` as
part of this migration. SmallTests have stricter timeout limits than
MediumTests, so this is a behavioral change that goes beyond a JUnit4→JUnit5
migration. Please confirm this re-classification is intentional, or restore the
original `SmallTests` tag.
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFileScannerWithTagCompression.java:
##########
@@ -43,25 +42,20 @@
import org.apache.hadoop.hbase.testclassification.SmallTests;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
-import org.junit.BeforeClass;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
-@Category({ RegionServerTests.class, SmallTests.class })
[email protected](RegionServerTests.TAG)
[email protected](SmallTests.TAG)
Review Comment:
Use a regular import for `org.junit.jupiter.api.Tag` and apply the
annotation as `@Tag(...)` instead of using the fully-qualified name. All other
test classes migrated in this PR follow this convention.
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSecureBulkloadListener.java:
##########
@@ -83,19 +76,17 @@ public void setUp() throws Exception {
new String[] { host1, host2, host3 });
conf = htu.getConfiguration();
- cluster = htu.getDFSCluster();
dfs = (DistributedFileSystem) FileSystem.get(conf);
}
Review Comment:
The line `cluster = htu.getDFSCluster();` was removed from `setUp`, but the
`cluster` field (line 56) is still declared. Either the field should be removed
if it is no longer needed, or the assignment should be restored. Removing only
the assignment leaves dead state on the test class.
--
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]