Skip to content

Commit

Permalink
HBASE-22941 Addendum fix NPE in UT
Browse files Browse the repository at this point in the history
  • Loading branch information
Apache9 committed Sep 20, 2019
1 parent 49718b8 commit e890776
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ public String explainFailure() throws Exception {

@Test
public void testMergeRegionOrder() throws Exception {

int regionCount= 20;

TableName tableName = TableName.valueOf("MergeRegionOrder");
Expand Down Expand Up @@ -143,14 +142,13 @@ public void testMergeRegionOrder() throws Exception {
RegionInfo mergedRegion = mergedRegions.get(0);

List<RegionInfo> mergeParentRegions = MetaTableAccessor.getMergeRegions(UTIL.getConnection(),
mergedRegion.getEncodedNameAsBytes());
mergedRegion.getRegionName());

assertEquals(mergeParentRegions.size(), regionCount);

for (int c = 0; c < regionCount-1; c++) {
assertTrue(Bytes.compareTo(
mergeParentRegions.get(c).getStartKey(),
mergeParentRegions.get(c+1).getStartKey()) < 0);
for (int c = 0; c < regionCount - 1; c++) {
assertTrue(Bytes.compareTo(mergeParentRegions.get(c).getStartKey(),
mergeParentRegions.get(c + 1).getStartKey()) < 0);
}
}
}

0 comments on commit e890776

Please sign in to comment.