From c8e1f700a050fd9e183de019246147051c12b9d2 Mon Sep 17 00:00:00 2001
From: Todd Lipcon <todd@cloudera.com>
Date: Thu, 14 Jan 2010 16:12:56 -0800
Subject: [PATCH] HDFS-187. Fix TestStartup for the case when a SecondaryNameNode is running on test machine

Contributed by Todd Lipcon
---
 .../hadoop/hdfs/server/namenode/TestStartup.java   |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/test/org/apache/hadoop/hdfs/server/namenode/TestStartup.java b/src/test/org/apache/hadoop/hdfs/server/namenode/TestStartup.java
index 807bb6f..011ce8c 100644
--- a/src/test/org/apache/hadoop/hdfs/server/namenode/TestStartup.java
+++ b/src/test/org/apache/hadoop/hdfs/server/namenode/TestStartup.java
@@ -28,7 +28,7 @@ import org.apache.hadoop.util.StringUtils;
  */
 public class TestStartup extends TestCase {
   public static final String NAME_NODE_HOST = "localhost:";
-  public static final String NAME_NODE_HTTP_HOST = "0.0.0.0:";
+  public static final String WILDCARD_HTTP_HOST = "0.0.0.0:";
   private static final Log LOG =
     LogFactory.getLog(TestStartup.class.getName());
   private Configuration config;
@@ -65,6 +65,7 @@ public class TestStartup extends TestCase {
     config.set("dfs.data.dir", new File(hdfsDir, "data").getPath());
 
     config.set("fs.checkpoint.dir",new File(hdfsDir, "secondary").getPath());
+    config.set("dfs.secondary.http.address", WILDCARD_HTTP_HOST + "0");
     //config.set("fs.default.name", "hdfs://"+ NAME_NODE_HOST + "0");
     
     FileSystem.setDefaultUri(config, "hdfs://"+NAME_NODE_HOST + "0");
-- 
1.6.0.4

