HBASE-8520 TestIOFencing fails intermittently due to compaction kicking in too soon (Ted Yu)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1481226 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2013-05-10 22:40:50 +00:00
parent e17a4ef2af
commit 639bf9cfa9
1 changed files with 5 additions and 5 deletions

View File

@ -240,16 +240,16 @@ public class TestIOFencing {
TEST_UTIL.createTable(TABLE_NAME, FAMILY); TEST_UTIL.createTable(TABLE_NAME, FAMILY);
HTable table = new HTable(c, TABLE_NAME); HTable table = new HTable(c, TABLE_NAME);
LOG.info("Loading test table"); LOG.info("Loading test table");
// Load some rows
TEST_UTIL.loadNumericRows(table, FAMILY, 0, FIRST_BATCH_COUNT);
// Find the region // Find the region
List<HRegion> testRegions = TEST_UTIL.getMiniHBaseCluster().findRegionsForTable(TABLE_NAME); List<HRegion> testRegions = TEST_UTIL.getMiniHBaseCluster().findRegionsForTable(TABLE_NAME);
assertEquals(1, testRegions.size()); assertEquals(1, testRegions.size());
compactingRegion = (CompactionBlockerRegion)testRegions.get(0); compactingRegion = (CompactionBlockerRegion)testRegions.get(0);
assertTrue(compactingRegion.countStoreFiles() > 1);
final byte REGION_NAME[] = compactingRegion.getRegionName();
LOG.info("Blocking compactions"); LOG.info("Blocking compactions");
compactingRegion.stopCompactions(); compactingRegion.stopCompactions();
// Load some rows
TEST_UTIL.loadNumericRows(table, FAMILY, 0, FIRST_BATCH_COUNT);
assertTrue(compactingRegion.countStoreFiles() > 1);
final byte REGION_NAME[] = compactingRegion.getRegionName();
LOG.info("Asking for compaction"); LOG.info("Asking for compaction");
admin.majorCompact(TABLE_NAME); admin.majorCompact(TABLE_NAME);
LOG.info("Waiting for compaction to be about to start"); LOG.info("Waiting for compaction to be about to start");
@ -300,4 +300,4 @@ public class TestIOFencing {
TEST_UTIL.shutdownMiniCluster(); TEST_UTIL.shutdownMiniCluster();
} }
} }
} }