hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r723182 - in /hadoop/core/trunk: CHANGES.txt src/test/org/apache/hadoop/cli/testConf.xml
Date Thu, 04 Dec 2008 01:20:10 GMT
Author: cdouglas
Date: Wed Dec  3 17:20:10 2008
New Revision: 723182

URL: http://svn.apache.org/viewvc?rev=723182&view=rev
Log:
HADOOP-4722. Add tests for dfsadmin quota error messages. Contributed by Boris Shkolnik.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/test/org/apache/hadoop/cli/testConf.xml

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=723182&r1=723181&r2=723182&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Wed Dec  3 17:20:10 2008
@@ -161,6 +161,9 @@
     HADOOP-4758. Add a splitter for metrics contexts to support more than one
     type of collector. (cdouglas)
 
+    HADOOP-4722. Add tests for dfsadmin quota error messages. (Boris Shkolnik
+    via cdouglas)
+
   OPTIMIZATIONS
 
     HADOOP-3293. Fixes FileInputFormat to do provide locations for splits

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/cli/testConf.xml
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/cli/testConf.xml?rev=723182&r1=723181&r2=723182&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/cli/testConf.xml (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/cli/testConf.xml Wed Dec  3 17:20:10 2008
@@ -3165,5 +3165,106 @@
         </comparator>
       </comparators>
     </test>
+    
+    <test> <!--Tested -->
+      <description>verifying error messages for quota commands - setting quota on a
file</description>
+      <test-commands>
+        <command>-fs NAMENODE -mkdir /test </command>
+        <command>-fs NAMENODE -touchz /test/file1 </command>
+        <admin-command>-fs NAMENODE -setQuota 1 /test/file1 </admin-command>
+      </test-commands>
+      <cleanup-commands>
+      	<admin-command>-fs NAMENODE -setQuota 5 /test </admin-command>
+        <!-- Same directory will be used in the next test -->
+      </cleanup-commands>
+      <comparators>
+        <comparator>
+          <type>SubstringComparator</type>
+          <expected-output>Cannot set quota on a file: /test/file1</expected-output>
+        </comparator>
+      </comparators>
+    </test>
+    
+    <test> <!--Tested -->
+      <description>verifying error messages for quota commands - setting quota on non-existing
file</description>
+      <test-commands>
+        <admin-command>-fs NAMENODE -setSpaceQuota 1g /test1 </admin-command>
+      </test-commands>
+      <cleanup-commands>
+             <!-- Same directory will be used in the next test -->   
+      </cleanup-commands>
+      <comparators>
+        <comparator>
+          <type>SubstringComparator</type>
+          <expected-output>Can not find listing for /test1</expected-output>
+        </comparator>
+      </comparators>
+    </test>
+    
+    <test> <!--Tested -->
+      <description>verifying error messages for quota commands - exceeding quota</description>
+      <test-commands>
+        <admin-command>-fs NAMENODE -setQuota 3 /test </admin-command>
+        <command>-fs NAMENODE -touchz /test/file0 </command>
+        <command>-fs NAMENODE -mkdir /test/test1 </command>
+      </test-commands>
+      <cleanup-commands>
+             <!-- Same directory(/test) will be used in the next test -->   
+      </cleanup-commands>
+      <comparators>
+        <comparator>
+          <type>SubstringComparator</type>
+          <expected-output>The quota of /test is exceeded</expected-output>
+        </comparator>
+      </comparators>
+    </test>
+
+    <test> <!--Tested -->
+      <description>verifying error messages for quota commands - setting not valid
quota</description>
+      <test-commands>
+        <admin-command>-fs NAMENODE -setQuota 0 /test </admin-command>
+      </test-commands>
+      <cleanup-commands>
+             <!-- Same directory will be used in the next test -->   
+      </cleanup-commands>
+      <comparators>
+        <comparator>
+          <type>SubstringComparator</type>
+          <expected-output>Invalid values for quota : 0</expected-output>
+        </comparator>
+      </comparators>
+    </test>
+    
+    <test> <!--Tested -->
+      <description>verifying error messages for quota commands - setting not valid
space quota</description>
+      <test-commands>
+        <admin-command>-fs NAMENODE -setSpaceQuota a5 /test </admin-command>
+      </test-commands>
+      <cleanup-commands>
+             <!-- Same directory will be used in the next test -->   
+      </cleanup-commands>
+      <comparators>
+        <comparator>
+          <type>SubstringComparator</type>
+          <expected-output>For input string: "a5"</expected-output>
+        </comparator>
+      </comparators>
+    </test>
+    
+    <test> <!--Tested -->
+      <description>verifying error messages for quota commands - clearQuota on non
existing file</description>
+      <test-commands>
+        <admin-command>-fs NAMENODE -clrQuota /test1 </admin-command>
+      </test-commands>
+      <cleanup-commands>
+      	<command>-fs NAMENODE -rmr /test </command>
+      </cleanup-commands>
+      <comparators>
+        <comparator>
+          <type>SubstringComparator</type>
+          <expected-output>Can not find listing for /test1</expected-output>
+        </comparator>
+      </comparators>
+    </test>
   </tests>
 </configuration>



Mime
View raw message