HBASE-22941 Addendum fix NPE in UT
This commit is contained in:
parent
0ed11fe452
commit
5b75bef36e
|
@ -109,7 +109,6 @@ public class TestSplitMerge {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMergeRegionOrder() throws Exception {
|
public void testMergeRegionOrder() throws Exception {
|
||||||
|
|
||||||
int regionCount= 20;
|
int regionCount= 20;
|
||||||
|
|
||||||
TableName tableName = TableName.valueOf("MergeRegionOrder");
|
TableName tableName = TableName.valueOf("MergeRegionOrder");
|
||||||
|
@ -143,14 +142,13 @@ public class TestSplitMerge {
|
||||||
RegionInfo mergedRegion = mergedRegions.get(0);
|
RegionInfo mergedRegion = mergedRegions.get(0);
|
||||||
|
|
||||||
List<RegionInfo> mergeParentRegions = MetaTableAccessor.getMergeRegions(UTIL.getConnection(),
|
List<RegionInfo> mergeParentRegions = MetaTableAccessor.getMergeRegions(UTIL.getConnection(),
|
||||||
mergedRegion.getEncodedNameAsBytes());
|
mergedRegion.getRegionName());
|
||||||
|
|
||||||
assertEquals(mergeParentRegions.size(), regionCount);
|
assertEquals(mergeParentRegions.size(), regionCount);
|
||||||
|
|
||||||
for (int c = 0; c < regionCount-1; c++) {
|
for (int c = 0; c < regionCount - 1; c++) {
|
||||||
assertTrue(Bytes.compareTo(
|
assertTrue(Bytes.compareTo(mergeParentRegions.get(c).getStartKey(),
|
||||||
mergeParentRegions.get(c).getStartKey(),
|
mergeParentRegions.get(c + 1).getStartKey()) < 0);
|
||||||
mergeParentRegions.get(c+1).getStartKey()) < 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue