HBASE-3659 Fix TestHLog to pass on newer versions of Hadoop

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1082403 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Todd Lipcon 2011-03-17 05:59:29 +00:00
parent 2563e25be0
commit 0f57c35465
2 changed files with 10 additions and 0 deletions

View File

@ -170,6 +170,7 @@ Release 0.90.2 - Unreleased
HBASE-3648 [replication] failover is sloppy with znodes
HBASE-3613 NPE in MemStoreFlusher
HBASE-3650 HBA.delete can return too fast
HBASE-3659 Fix TestHLog to pass on newer versions of Hadoop
IMPROVEMENTS
HBASE-3542 MultiGet methods in Thrift

View File

@ -111,6 +111,8 @@ public class TestHLog {
.setInt("ipc.client.connect.max.retries", 1);
TEST_UTIL.getConfiguration().setInt(
"dfs.client.block.recovery.retries", 1);
TEST_UTIL.getConfiguration().setInt(
"ipc.client.connection.maxidletime", 500);
TEST_UTIL.getConfiguration().set(CoprocessorHost.WAL_COPROCESSOR_CONF_KEY,
SampleRegionWALObserver.class.getName());
TEST_UTIL.startMiniCluster(3);
@ -371,6 +373,13 @@ public class TestHLog {
LOG.error("Waiting for cluster to go down");
Thread.sleep(1000);
}
// Workaround a strange issue with Hadoop's RPC system - if we don't
// sleep here, the new datanodes will pick up a cached IPC connection to
// the old (dead) NN and fail to start. Sleeping 2 seconds goes past
// the idle time threshold configured in the conf above
Thread.sleep(2000);
cluster = new MiniDFSCluster(namenodePort, conf, 5, false, true, true, null, null, null, null);
cluster.waitActive();
fs = cluster.getFileSystem();