HBASE-18227 Fixed unit test hbase.coprocessor.TestCoprocessorMetrics#testRegionObserverAfterRegionClosed

Calling closeRegion() directly on remote server is not supported post-AMv2. Calling unassign() on master

Signed-off-by: Michael Stack <stack@apache.org>
This commit is contained in:
Umesh Agashe 2017-06-16 14:12:54 -07:00 committed by Michael Stack
parent cd478d1564
commit b02d3d9ed5
1 changed files with 1 additions and 1 deletions

View File

@ -472,7 +472,7 @@ public class TestCoprocessorMetrics {
// close one of the regions
try (RegionLocator locator = connection.getRegionLocator(tableName)) {
HRegionLocation loc = locator.getRegionLocation(foo);
admin.closeRegion(loc.getServerName(), loc.getRegionInfo());
admin.unassign(loc.getRegionInfo().getEncodedNameAsBytes(), true);
HRegionServer server = UTIL.getMiniHBaseCluster().getRegionServer(loc.getServerName());
UTIL.waitFor(30000,