junegunn commented on code in PR #7173:
URL: https://github.com/apache/hbase/pull/7173#discussion_r2232258569


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestRegionSplitter.java:
##########
@@ -108,6 +109,35 @@ public void testCreatePresplitTableHex() throws Exception {
       TableName.valueOf(name.getMethodName()));
   }
 
+  /**
+   * Test creating a pre-split table and splitting it again using the 
HexStringSplit and
+   * DecimalStringSplit algorithms.
+   */
+  @Test
+  public void testSplitPresplitTable() throws Exception {

Review Comment:
   Thanks for the review.
   
   > so the test fails without this patch and passes with right? 
   
   Yes, that's correct. Without the patch, the verification after the split 
fails because the result of `splitter.split(16)` differs from the real 
boundaries after `RegionSplitter.rollingSplit`.
   
   > also do tests `unitTestHexStringSplit` and `unitTestDecimalStringSplit` 
don't catch these?
   
   They don't, because they don't test the max keys (`FFFFFFFF` and `99999999`) 
as the stop row. Adding such a case to those tests could have been a one way to 
verify this. But there was no proper test for `RegionSplitter.rollingSplit` to 
begin with, so I took this as an opportunity to add a more realistic test for 
it.



-- 
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-unsubscr...@hbase.apache.org

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

Reply via email to