incubator-bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r1353332 - in /incubator/bigtop/trunk/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest: hadooptests/TestFsck.groovy hdfstests/TestFsck.groovy
Date Sun, 24 Jun 2012 21:07:27 GMT
Author: rvs
Date: Sun Jun 24 21:07:26 2012
New Revision: 1353332

URL: http://svn.apache.org/viewvc?rev=1353332&view=rev
Log:
BIGTOP-641. Add hdfs fsck options in TestFsck (Stephen Chu via rvs)

Added:
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hdfstests/TestFsck.groovy
      - copied, changed from r1353330, incubator/bigtop/trunk/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadooptests/TestFsck.groovy
Removed:
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadooptests/TestFsck.groovy

Copied: incubator/bigtop/trunk/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hdfstests/TestFsck.groovy
(from r1353330, incubator/bigtop/trunk/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadooptests/TestFsck.groovy)
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hdfstests/TestFsck.groovy?p2=incubator/bigtop/trunk/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hdfstests/TestFsck.groovy&p1=incubator/bigtop/trunk/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadooptests/TestFsck.groovy&r1=1353330&r2=1353332&rev=1353332&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadooptests/TestFsck.groovy
(original)
+++ incubator/bigtop/trunk/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hdfstests/TestFsck.groovy
Sun Jun 24 21:07:26 2012
@@ -15,7 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.bigtop.itest.hadooptests
+package org.apache.bigtop.itest.hdfstests
 
 import org.junit.Test
 import org.apache.bigtop.itest.shell.Shell
@@ -26,14 +26,26 @@ import static org.apache.bigtop.itest.Lo
  * Tests the HDFS fsck command.
  */
 public class TestFsck {
-  static Shell sh = new Shell("/bin/bash -s")
-  static final String fsck_cmd = "hdfs fsck /"
+  static Shell shHDFS = new Shell("/bin/bash", "hdfs" )
+  String[] fsckCmds = [
+    "hdfs fsck /",
+    "hdfs fsck -move /",
+    "hdfs fsck -delete /",
+    "hdfs fsck / -files",
+    "hdfs fsck -openforwrite /",
+    "hdfs fsck -list-corruptfileblocks /",
+    "hdfs fsck -blocks /",
+    "hdfs fsck -locations /",
+    "hdfs fsck -racks /"
+  ]
 
   @Test
   public void testFsckBasic() {
-    sh.exec(fsck_cmd)
-    logError(sh)
-    assertTrue(sh.getRet() == 0)
+    for (cmd in fsckCmds) {
+      shHDFS.exec(cmd)
+      logError(shHDFS)
+      assertTrue(shHDFS.getRet() == 0)
+    }
   }
 
 }



Mime
View raw message