You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "liuxiaocs7 (via GitHub)" <gi...@apache.org> on 2026/04/24 16:51:06 UTC

[PR] HBASE-30066 Upgrade hbase-server to use junit5 Part9 (#8119) [hbase]

liuxiaocs7 opened a new pull request, #8133:
URL: https://github.com/apache/hbase/pull/8133

   Signed-off-by: Duo Zhang <zh...@apache.org>
   
   (cherry picked from commit b5f648b6d8d5449740112590b8d49d33f5c5ce5d)
   
   - for branch-2.6
   - see: HBASE-30066


-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] HBASE-30066 Upgrade hbase-server to use junit5 Part9 (#8119) [hbase]

Posted by "liuxiaocs7 (via GitHub)" <gi...@apache.org>.
liuxiaocs7 merged PR #8133:
URL: https://github.com/apache/hbase/pull/8133


-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] HBASE-30066 Upgrade hbase-server to use junit5 Part9 (#8119) [hbase]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org