Browse Source

HDFS-908. TestDistributedFileSystem fails with Wrong FS on weird hosts. Contributed by Todd Lipcon

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20@1035728 13f79535-47bb-0310-9956-ffa450edef68
Eli Collins 14 years ago
parent
commit
f845b2a8ad
2 changed files with 7 additions and 1 deletions
  1. 3 0
      CHANGES.txt
  2. 4 1
      src/test/org/apache/hadoop/hdfs/TestDistributedFileSystem.java

+ 3 - 0
CHANGES.txt

@@ -67,6 +67,9 @@ Release 0.20.3 - Unreleased
 
 
     HDFS-727. bug setting block size hdfsOpenFile (Eli Collins via cos)
     HDFS-727. bug setting block size hdfsOpenFile (Eli Collins via cos)
 
 
+    HDFS-908. TestDistributedFileSystem fails with Wrong FS on weird hosts. 
+    (Todd Lipcon via eli)
+
   IMPROVEMENTS
   IMPROVEMENTS
 
 
     MAPREDUCE-1407. Update javadoc in mapreduce.{Mapper,Reducer} to match
     MAPREDUCE-1407. Update javadoc in mapreduce.{Mapper,Reducer} to match

+ 4 - 1
src/test/org/apache/hadoop/hdfs/TestDistributedFileSystem.java

@@ -130,9 +130,12 @@ public class TestDistributedFileSystem extends junit.framework.TestCase {
 
 
     final MiniDFSCluster cluster = new MiniDFSCluster(conf, 2, true, null);
     final MiniDFSCluster cluster = new MiniDFSCluster(conf, 2, true, null);
     final FileSystem hdfs = cluster.getFileSystem();
     final FileSystem hdfs = cluster.getFileSystem();
-    final String hftpuri = "hftp://" + conf.get("dfs.http.address");
+
+    String hftpuri = "hftp://" + conf.get("dfs.http.address");
+
     System.out.println("hftpuri=" + hftpuri);
     System.out.println("hftpuri=" + hftpuri);
     final FileSystem hftp = new Path(hftpuri).getFileSystem(conf);
     final FileSystem hftp = new Path(hftpuri).getFileSystem(conf);
+    hftpuri = hftp.getUri().toString();
 
 
     final String dir = "/filechecksum";
     final String dir = "/filechecksum";
     final int block_size = 1024;
     final int block_size = 1024;