hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r1102459 - in /hadoop/hdfs/trunk: CHANGES.txt src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml src/test/hdfs/org/apache/hadoop/hdfs/TestDFSShell.java
Date Thu, 12 May 2011 21:09:16 GMT
Author: szetszwo
Date: Thu May 12 21:09:16 2011
New Revision: 1102459

URL: http://svn.apache.org/viewvc?rev=1102459&view=rev
Log:
HDFS-1903. Fix path display for rm/rmr in TestHDFSCLI and TestDFSShell.  Contributed by Daryn
Sharp

Modified:
    hadoop/hdfs/trunk/CHANGES.txt
    hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml
    hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/TestDFSShell.java

Modified: hadoop/hdfs/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=1102459&r1=1102458&r2=1102459&view=diff
==============================================================================
--- hadoop/hdfs/trunk/CHANGES.txt (original)
+++ hadoop/hdfs/trunk/CHANGES.txt Thu May 12 21:09:16 2011
@@ -538,6 +538,9 @@ Trunk (unreleased changes)
     HDFS-1912. Update tests for FsShell standardized error messages.
     (Daryn Sharp via szetszwo)
 
+    HDFS-1903. Fix path display for rm/rmr in TestHDFSCLI and TestDFSShell.
+    (Daryn Sharp via szetszwo)
+
 Release 0.22.0 - Unreleased
 
   NEW FEATURES

Modified: hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml?rev=1102459&r1=1102458&r2=1102459&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml (original)
+++ hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/testHDFSConf.xml Thu May 12 21:09:16
2011
@@ -3164,7 +3164,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/dir0/file0</expected-output>
+          <expected-output>^Deleted /dir0/file0</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -3181,7 +3181,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/user/[a-z]*/file0</expected-output>
+          <expected-output>^Deleted file0</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -3262,7 +3262,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^rm: Cannot remove directory "hdfs://\w+[.a-z]*:[0-9]*/dir0",
use -rmr instead</expected-output>
+          <expected-output>^rm: `/dir0': Is a directory</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -3328,7 +3328,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/file0</expected-output>
+          <expected-output>^Deleted hdfs:///file0</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -3377,7 +3377,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^rm: Cannot remove directory "hdfs://\w+[.a-z]*:[0-9]*/dir0",
use -rmr instead</expected-output>
+          <expected-output>^rm: `hdfs:///dir0': Is a directory</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -3394,7 +3394,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^rm: `hdfs:/file0': No such file or directory</expected-output>
+          <expected-output>^rm: `hdfs:///file0': No such file or directory</expected-output>
         </comparator>
      </comparators>
     </test>
@@ -3414,19 +3414,19 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/file0</expected-output>
+          <expected-output>^Deleted hdfs:///file0</expected-output>
        </comparator>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/file1</expected-output>
+          <expected-output>^Deleted hdfs:///file1</expected-output>
        </comparator>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/file2</expected-output>
+          <expected-output>^Deleted hdfs:///file2</expected-output>
        </comparator>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/file3</expected-output>
+          <expected-output>^Deleted hdfs:///file3</expected-output>
        </comparator>
       </comparators>
     </test>
@@ -3559,7 +3559,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/dir0/file0</expected-output>
+          <expected-output>^Deleted /dir0/file0</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -3576,7 +3576,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/user/[a-z]*/file0</expected-output>
+          <expected-output>^Deleted file0</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -3593,7 +3593,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/dir0</expected-output>
+          <expected-output>^Deleted /dir0</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -3610,7 +3610,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/user/[a-z]*/dir0</expected-output>
+          <expected-output>^Deleted dir0</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -3723,7 +3723,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/file0</expected-output>
+          <expected-output>^Deleted hdfs:///file0</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -3740,7 +3740,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/dir0</expected-output>
+          <expected-output>^Deleted hdfs:///dir0</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -3788,7 +3788,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^rmr: `hdfs:/file0': No such file or directory</expected-output>
+          <expected-output>^rmr: `hdfs:///file0': No such file or directory</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -3808,19 +3808,19 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/dir0</expected-output>
+          <expected-output>^Deleted hdfs:///dir0</expected-output>
         </comparator>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/dir1</expected-output>
+          <expected-output>^Deleted hdfs:///dir1</expected-output>
         </comparator>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/dir2</expected-output>
+          <expected-output>^Deleted hdfs:///dir2</expected-output>
         </comparator>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^Deleted hdfs://\w+[.a-z]*:[0-9]*/dir3</expected-output>
+          <expected-output>^Deleted hdfs:///dir3</expected-output>
         </comparator>
       </comparators>
     </test>

Modified: hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/TestDFSShell.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/TestDFSShell.java?rev=1102459&r1=1102458&r2=1102459&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/TestDFSShell.java (original)
+++ hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/TestDFSShell.java Thu May 12 21:09:16
2011
@@ -331,7 +331,7 @@ public class TestDFSShell extends TestCa
       FsShell shell = new FsShell();
       shell.setConf(conf);
       ret = ToolRunner.run(shell, argv);
-      assertTrue(" -rm returned -1 ", 0>=ret);
+      assertEquals(" -rm returned 1 ", 1, ret);
       returned = out.toString();
       out.reset();
       assertTrue("rm prints reasonable error ",
@@ -339,7 +339,7 @@ public class TestDFSShell extends TestCa
       argv[0] = "-rmr";
       argv[1] = root.toString();
       ret = ToolRunner.run(shell, argv);
-      assertTrue(" -rmr returned -1", 0>=ret);
+      assertEquals(" -rmr returned 1", 1, ret);
       returned = out.toString();
       assertTrue("rmr prints reasonable error ",
     		  (returned.lastIndexOf("No such file or directory") != -1));



Mime
View raw message