hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r635664 - in /hadoop/core/trunk: CHANGES.txt src/test/org/apache/hadoop/dfs/TestLocalDFS.java
Date Mon, 10 Mar 2008 19:29:10 GMT
Author: dhruba
Date: Mon Mar 10 12:29:05 2008
New Revision: 635664

URL: http://svn.apache.org/viewvc?rev=635664&view=rev
Log:
HADOOP-2973. Fix TestLocalDFS for Windows platform.
(Tsz Wo (Nicholas), SZE via dhruba)


Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestLocalDFS.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=635664&r1=635663&r2=635664&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Mon Mar 10 12:29:05 2008
@@ -164,6 +164,9 @@
     HADOOP-2870.  DataNode and NameNode closes all connections while
     shutting down. (Hairong Kuang via dhruba)
 
+    HADOOP-2973. Fix TestLocalDFS for Windows platform.
+    (Tsz Wo (Nicholas), SZE via dhruba)
+
 Release 0.16.1 - 2008-03-13
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestLocalDFS.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestLocalDFS.java?rev=635664&r1=635663&r2=635664&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestLocalDFS.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestLocalDFS.java Mon Mar 10 12:29:05
2008
@@ -48,7 +48,14 @@
     fileSys.delete(name, true);
     assertTrue(!fileSys.exists(name));
   }
-  
+
+  static String getUserName(FileSystem fs) {
+    if (fs instanceof DistributedFileSystem) {
+      return ((DistributedFileSystem)fs).dfs.ugi.getUserName();
+    }
+    return System.getProperty("user.name");
+  }
+
   /**
    * Tests get/set working directory in DFS.
    */
@@ -75,7 +82,7 @@
                                     file1.toString()));
 
       // test home directory
-      Path home = new Path("/user/"+System.getProperty("user.name"))
+      Path home = new Path("/user/" + getUserName(fileSys))
         .makeQualified(fileSys);
       Path fsHome = fileSys.getHomeDirectory();
       assertEquals(home, fsHome);



Mime
View raw message