Copilot commented on code in PR #8133:
URL: https://github.com/apache/hbase/pull/8133#discussion_r3139220278
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestSnapshotWhenChoreCleaning.java:
##########
@@ -55,13 +53,9 @@
/**
* Test Case for HBASE-21387
*/
-@Category({ MediumTests.class })
+@Tag(MediumTests.TAG)
public class TestSnapshotWhenChoreCleaning {
- @ClassRule
- public static final HBaseClassTestRule CLASS_RULE =
- HBaseClassTestRule.forClass(TestSnapshotWhenChoreCleaning.class);
-
private static final HBaseTestingUtility TEST_UTIL = new
HBaseTestingUtility();
private static final Configuration CONF = TEST_UTIL.getConfiguration();
private static final Logger LOG =
LoggerFactory.getLogger(TestSnapshotClientRetries.class);
Review Comment:
Logger is initialized with TestSnapshotClientRetries.class, which makes log
output misleading for this test. Use TestSnapshotWhenChoreCleaning.class (or
getClass() if non-static) instead.
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/fs/TestBlockReorderMultiBlocks.java:
##########
@@ -211,7 +205,7 @@ public void postLogRoll(final Path oldPath, final Path
newPath) throws IOExcepti
LOG.info(bl.getHosts().length + " replicas for block 0 in " +
logFile + " ");
for (int i = 0; i < bl.getHosts().length - 1; i++) {
LOG.info(bl.getHosts()[i] + " " + logFile);
- Assert.assertNotSame(bl.getHosts()[i], host4);
+ assertNotSame(bl.getHosts()[i], host4);
}
Review Comment:
`assertNotSame(bl.getHosts()[i], host4)` only checks reference identity, so
it can pass even if the hostname string equals "host4". Since the intent here
is to ensure the other replicas are not on host4, use a value comparison (e.g.,
`assertNotEquals(host4, bl.getHosts()[i])`).
--
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]