// Wait for the Regions to be mergeable
MiniHBaseCluster miniCluster = TEST_UTIL.getMiniHBaseCluster();
int mergeable = 0;
while (mergeable < 2) {
Thread.sleep(100);
admin.majorCompact(TABLE_NAME);
mergeable = 0;
for (JVMClusterUtil.RegionServerThread regionThread: miniCluster.getRegionServerThreads()) {
for (HRegion region: regionThread.getRegionServer().getOnlineRegions(TABLE_NAME)) {
mergeable += region.isMergeable() ? 1 : 0;
}