hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject svn commit: r1409850 - in /hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs: CHANGES.txt src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java src/test/resources/testHDFSConf.xml
Date Thu, 15 Nov 2012 15:55:37 GMT
Author: daryn
Date: Thu Nov 15 15:55:36 2012
New Revision: 1409850

URL: http://svn.apache.org/viewvc?rev=1409850&view=rev
Log:
svn merge -c 1409848 FIXES: HDFS-4104. dfs -test -d prints inappropriate error on nonexistent
directory (Andy Isaacson via daryn)

Modified:
    hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
    hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java
    hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1409850&r1=1409849&r2=1409850&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Thu Nov 15
15:55:36 2012
@@ -238,6 +238,9 @@ Release 2.0.3-alpha - Unreleased
     HDFS-4139. fuse-dfs RO mode still allows file truncation.
     (Colin Patrick McCabe via eli)    
 
+    HDFS-4104. dfs -test -d prints inappropriate error on nonexistent directory
+    (Andy Isaacson via daryn)
+
 Release 2.0.2-alpha - 2012-09-07 
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java?rev=1409850&r1=1409849&r2=1409850&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java
Thu Nov 15 15:55:36 2012
@@ -452,6 +452,15 @@ public class TestDFSShell {
       assertEquals(" no error ", 0, ret);
       assertTrue("empty path specified",
           (returned.lastIndexOf("empty string") == -1));
+      out.reset();
+      argv = new String[3];
+      argv[0] = "-test";
+      argv[1] = "-d";
+      argv[2] = "/no/such/dir";
+      ret = ToolRunner.run(shell, argv);
+      returned = out.toString();
+      assertEquals(" -test -d wrong result ", 1, ret);
+      assertTrue(returned.isEmpty());
     } finally {
       if (bak != null) {
         System.setErr(bak);

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml?rev=1409850&r1=1409849&r2=1409850&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
(original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
Thu Nov 15 15:55:36 2012
@@ -6264,8 +6264,8 @@
       </cleanup-commands>
       <comparators>
         <comparator>
-          <type>RegexpComparator</type>
-          <expected-output>^test: `/dir0/file': No such file or directory</expected-output>
+          <type>ExactComparator</type>
+          <expected-output></expected-output>
         </comparator>
       </comparators>
     </test>
@@ -6280,8 +6280,8 @@
       </cleanup-commands>
       <comparators>
         <comparator>
-          <type>RegexpComparator</type>
-          <expected-output>^test: `file': No such file or directory</expected-output>
+          <type>ExactComparator</type>
+          <expected-output></expected-output>
         </comparator>
       </comparators>
     </test>
@@ -6296,8 +6296,8 @@
       </cleanup-commands>
       <comparators>
         <comparator>
-          <type>RegexpComparator</type>
-          <expected-output>^test: `/dir': No such file or directory</expected-output>
+          <type>ExactComparator</type>
+          <expected-output></expected-output>
         </comparator>
       </comparators>
     </test>
@@ -6312,8 +6312,8 @@
       </cleanup-commands>
       <comparators>
         <comparator>
-          <type>RegexpComparator</type>
-          <expected-output>^test: `dir0': No such file or directory</expected-output>
+          <type>ExactComparator</type>
+          <expected-output></expected-output>
         </comparator>
       </comparators>
     </test>
@@ -6328,8 +6328,8 @@
       </cleanup-commands>
       <comparators>
         <comparator>
-          <type>RegexpComparator</type>
-          <expected-output>^test: `hdfs:///dir0/file': No such file or directory</expected-output>
+          <type>ExactComparator</type>
+          <expected-output></expected-output>
         </comparator>
       </comparators>
     </test>
@@ -6344,8 +6344,8 @@
       </cleanup-commands>
       <comparators>
         <comparator>
-          <type>RegexpComparator</type>
-          <expected-output>^test: `hdfs:///dir': No such file or directory</expected-output>
+          <type>ExactComparator</type>
+          <expected-output></expected-output>
         </comparator>
       </comparators>
     </test>
@@ -6360,8 +6360,8 @@
       </cleanup-commands>
       <comparators>
         <comparator>
-          <type>RegexpComparator</type>
-          <expected-output>^test: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir0/file': No such
file or directory</expected-output>
+          <type>ExactComparator</type>
+          <expected-output></expected-output>
         </comparator>
       </comparators>
     </test>
@@ -6376,8 +6376,8 @@
       </cleanup-commands>
       <comparators>
         <comparator>
-          <type>RegexpComparator</type>
-          <expected-output>^test: `hdfs://\w+[-.a-z0-9]*:[0-9]+/dir': No such file
or directory</expected-output>
+          <type>ExactComparator</type>
+          <expected-output></expected-output>
         </comparator>
       </comparators>
     </test>



Mime
View raw message