huaxiangsun commented on a change in pull request #1719:
URL: https://github.com/apache/hbase/pull/1719#discussion_r426371166



##########
File path: 
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi2.java
##########
@@ -161,20 +163,39 @@ public void testMergeRegions() throws Exception {
       .getTableHRegionLocations(metaTable, tableName).get();
     RegionInfo regionA;
     RegionInfo regionB;
+    RegionInfo regionC;
+    RegionInfo mergedChildRegion = null;
 
     // merge with full name
     assertEquals(3, regionLocations.size());
     regionA = regionLocations.get(0).getRegion();
     regionB = regionLocations.get(1).getRegion();
+    regionC = regionLocations.get(2).getRegion();
     admin.mergeRegions(regionA.getRegionName(), regionB.getRegionName(), 
false).get();
 
     regionLocations = AsyncMetaTableAccessor
       .getTableHRegionLocations(metaTable, tableName).get();
+
     assertEquals(2, regionLocations.size());
+    for (HRegionLocation rl : regionLocations) {
+      if (regionC.compareTo(rl.getRegion()) != 0) {
+        mergedChildRegion = rl.getRegion();
+        break;
+      }
+    }
+
+    assertTrue(mergedChildRegion != null);

Review comment:
       Thanks @HorizonNet, let me address the comments and push another update. 
For some reason, the second push did not trigger unittest runs.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to