Index: hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java =================================================================== --- hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java (revision 1462724) +++ hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java (working copy) @@ -1928,9 +1928,10 @@ * * @param tableName name of table * @param maxAttempts maximum number of attempts, unlimited for value of -1 + * @param forceSplit * @return the HRegion chosen, null if none was found within limit of maxAttempts */ - public HRegion getSplittableRegion(byte[] tableName, int maxAttempts) { + public HRegion getSplittableRegion(byte[] tableName, int maxAttempts, boolean forceSplit) { List regions = getHBaseCluster().getRegions(tableName); int regCount = regions.size(); Set attempted = new HashSet(); @@ -1947,6 +1948,7 @@ // if we have just tried this region, there is no need to try again if (attempted.contains(idx)) continue; try { + if (forceSplit) regions.get(idx).forceSplit(null); regions.get(idx).checkSplit(); return regions.get(idx); } catch (Exception ex) { Index: hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestTableLockManager.java =================================================================== --- hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestTableLockManager.java (revision 1462724) +++ hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestTableLockManager.java (working copy) @@ -354,7 +354,7 @@ @Override public void chore() { try { - HRegion region = TEST_UTIL.getSplittableRegion(tableName, -1); + HRegion region = TEST_UTIL.getSplittableRegion(tableName, -1, true); byte[] regionName = region.getRegionName(); admin.flush(regionName); admin.compact(regionName); Index: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (revision 1462724) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (working copy) @@ -5130,7 +5130,7 @@ return this.explicitSplitPoint; } - void forceSplit(byte[] sp) { + public void forceSplit(byte[] sp) { // NOTE : this HRegion will go away after the forced split is successfull // therefore, no reason to clear this value this.splitRequest = true;