HBASE-6622 TestUpgradeFromHFileV1ToEncoding#testUpgrade fails in trunk

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1377508 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2012-08-26 20:11:21 +00:00
parent 638529d93b
commit d992c7742e
2 changed files with 8 additions and 4 deletions

View File

@ -58,9 +58,11 @@ public class TestMultiVersions {
private static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
private HBaseAdmin admin;
private static final int NUM_SLAVES = 3;
@BeforeClass
public static void setUpBeforeClass() throws Exception {
UTIL.startMiniCluster();
UTIL.startMiniCluster(NUM_SLAVES);
}
@AfterClass
@ -140,7 +142,7 @@ public class TestMultiVersions {
table.close();
UTIL.shutdownMiniHBaseCluster();
LOG.debug("HBase cluster shut down -- restarting");
UTIL.startMiniHBaseCluster(1, 1);
UTIL.startMiniHBaseCluster(1, NUM_SLAVES);
// Make a new connection. Use new Configuration instance because old one
// is tied to an HConnection that has since gone stale.
table = new HTable(new Configuration(UTIL.getConfiguration()), tableName);

View File

@ -52,12 +52,14 @@ public class TestUpgradeFromHFileV1ToEncoding {
private static final int NUM_HFILE_V1_BATCHES = 10;
private static final int NUM_HFILE_V2_BATCHES = 20;
private static final int NUM_SLAVES = 3;
@BeforeClass
public static void setUpBeforeClass() throws Exception {
// Use a small flush size to create more HFiles.
conf.setInt(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 1024 * 1024);
conf.setInt(HFile.FORMAT_VERSION_KEY, 1); // Use HFile v1 initially
TEST_UTIL.startMiniCluster();
TEST_UTIL.startMiniCluster(NUM_SLAVES);
LOG.debug("Started an HFile v1 cluster");
}
@ -81,7 +83,7 @@ public class TestUpgradeFromHFileV1ToEncoding {
TEST_UTIL.shutdownMiniHBaseCluster();
conf.setInt(HFile.FORMAT_VERSION_KEY, 2);
TEST_UTIL.startMiniHBaseCluster(1, 1);
TEST_UTIL.startMiniHBaseCluster(1, NUM_SLAVES);
LOG.debug("Started an HFile v2 cluster");
admin = new HBaseAdmin(conf);
htd = admin.getTableDescriptor(TABLE_BYTES);