HBASE-15959 Fix flaky test TestRegionServerMetrics.testMobMetrics (Huaxiang Sun and Jingcheng Du)

This commit is contained in:
Jonathan M Hsieh 2016-06-08 19:07:13 -07:00
parent d9463bcce0
commit a7172d5611
1 changed files with 4 additions and 0 deletions

View File

@ -451,6 +451,10 @@ public class TestRegionServerMetrics {
admin.flush(tableName);
}
region.getTableDesc().getFamily(cf).setMobThreshold(0);
// closing the region forces the compaction.discharger to archive the compacted hfiles
((HRegion) region).close();
// metrics are reset by the region initialization
((HRegion) region).initialize();
region.compact(true);