Updated Branches: refs/heads/master 619c19a7e -> 1271d5ee9
BIGTOP-895. A number of testcases in TestCLI are failing with (at least) Hadoop 2.0.3 and later Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/1271d5ee Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/1271d5ee Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/1271d5ee Branch: refs/heads/master Commit: 1271d5ee9413f8821f207f154e6a062eeb6938f2 Parents: 619c19a Author: Anatoli Fomenko <[email protected]> Authored: Sun Apr 28 10:27:42 2013 -0700 Committer: Roman Shaposhnik <[email protected]> Committed: Mon Apr 29 21:23:20 2013 -0700 ---------------------------------------------------------------------- .../apache/bigtop/itest/hadoop/hdfs/TestCLI.java | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/1271d5ee/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestCLI.java ---------------------------------------------------------------------- diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestCLI.java b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestCLI.java index 7b02f08..46c11f8 100644 --- a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestCLI.java +++ b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestCLI.java @@ -27,6 +27,7 @@ import org.apache.hadoop.cli.util.CLICommandFS; import org.apache.hadoop.cli.util.CommandExecutor; import org.apache.hadoop.hdfs.DFSConfigKeys; import org.apache.hadoop.hdfs.HdfsConfiguration; +import org.apache.bigtop.itest.shell.Shell; import org.junit.After; import org.junit.Before; @@ -36,10 +37,11 @@ import org.junit.Test; * Tests for the Command Line Interface (CLI) */ public class TestCLI extends CLITestHelper { - public static final String TEST_DIR_ABSOLUTE = "/tmp/testcli"; + public static final String TEST_DIR_ABSOLUTE = "/tmp/testcli_" + Long.valueOf(System.currentTimeMillis()); private String nn; private String sug; - protected String namenode = null; + protected String namenode; + private static Shell shHDFS = new Shell("/bin/bash", "hdfs"); @Before @Override @@ -55,12 +57,19 @@ public class TestCLI extends CLITestHelper { namenode = conf.get(DFSConfigKeys.FS_DEFAULT_NAME_KEY, "file:///"); // Many of the tests expect a replication value of 1 in the output conf.setInt("dfs.replication", 1); + + String[] createTestcliDirCmds = {"hadoop fs -mkdir -p " + TEST_DIR_ABSOLUTE, + "hadoop fs -chmod 777 " + TEST_DIR_ABSOLUTE}; + shHDFS.exec(createTestcliDirCmds); } @After @Override public void tearDown() throws Exception { super.tearDown(); + + String removeTestcliDirCmd = "hadoop fs -rm -r " + TEST_DIR_ABSOLUTE; + shHDFS.exec(removeTestcliDirCmd); } @Override
