HBASE-22941 Addendum fix NPE in UT

This commit is contained in:
Duo Zhang 2019-09-20 14:35:56 +08:00
parent 49718b8b46
commit e890776fe0
1 changed files with 4 additions and 6 deletions

View File

@ -109,7 +109,6 @@ public class TestSplitMerge {
@Test
public void testMergeRegionOrder() throws Exception {
int regionCount= 20;
TableName tableName = TableName.valueOf("MergeRegionOrder");
@ -143,13 +142,12 @@ public class TestSplitMerge {
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(),
assertTrue(Bytes.compareTo(mergeParentRegions.get(c).getStartKey(),
mergeParentRegions.get(c + 1).getStartKey()) < 0);
}
}