hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xunzh...@apache.org
Subject [2/2] incubator-hawq git commit: HAWQ-1044. Fix bugs in testcase TestHawqRegister.TestUsage2Case1IncludeDirectory
Date Wed, 14 Dec 2016 10:57:57 GMT
HAWQ-1044. Fix bugs in testcase TestHawqRegister.TestUsage2Case1IncludeDirectory


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/81d9de54
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/81d9de54
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/81d9de54

Branch: refs/heads/master
Commit: 81d9de544f292aa80264fd44e806e862999894b9
Parents: 49367ab
Author: Chunling Wang <wangchunling14@126.com>
Authored: Tue Dec 13 10:32:25 2016 +0800
Committer: xunzhang <xunzhangthu@gmail.com>
Committed: Wed Dec 14 18:57:37 2016 +0800

----------------------------------------------------------------------
 .../test_hawq_register_usage2_case1.cpp         |  9 +++++++++
 .../usage2case1/includedirectory.yml            | 21 --------------------
 .../usage2case1/includedirectory_tpl.yml        | 21 ++++++++++++++++++++
 3 files changed, 30 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/81d9de54/src/test/feature/ManagementTool/test_hawq_register_usage2_case1.cpp
----------------------------------------------------------------------
diff --git a/src/test/feature/ManagementTool/test_hawq_register_usage2_case1.cpp b/src/test/feature/ManagementTool/test_hawq_register_usage2_case1.cpp
index da44cc8..0c05c33 100644
--- a/src/test/feature/ManagementTool/test_hawq_register_usage2_case1.cpp
+++ b/src/test/feature/ManagementTool/test_hawq_register_usage2_case1.cpp
@@ -328,7 +328,16 @@ TEST_F(TestHawqRegister, TestUsage2Case1IncludeDirectory) {
     string test_root(util.getTestRootPath());
     EXPECT_EQ(0, Command::getCommandStatus(hawq::test::stringFormat("hadoop fs -put -f %s/ManagementTool/usage2case1
%s/", test_root.c_str(), getHdfsLocation().c_str())));
     string t_yml(hawq::test::stringFormat("%s/ManagementTool/usage2case1/includedirectory.yml",
test_root.c_str()));
+    string t_yml_tpl(hawq::test::stringFormat("%s/ManagementTool/usage2case1/includedirectory_tpl.yml",
test_root.c_str()));
+    hawq::test::FileReplace frep;
+    std::unordered_map<std::string, std::string> strs_src_dst;
+    hawq::test::HdfsConfig hc;
+    string hdfs_prefix;
+    hc.getNamenodeHost(hdfs_prefix);
+    strs_src_dst["@PORT@"]= hdfs_prefix;
+    frep.replace(t_yml_tpl, t_yml, strs_src_dst);
     EXPECT_EQ(1, Command::getCommandStatus(hawq::test::stringFormat("hawq register -d %s
-c %s testhawqregister_testusage2case1includedirectory.nt", HAWQ_DB, t_yml.c_str())));
+    EXPECT_EQ(0, Command::getCommandStatus(hawq::test::stringFormat("rm -rf %s", t_yml.c_str())));
     EXPECT_EQ(0, Command::getCommandStatus(hawq::test::stringFormat("hdfs dfs -rm -r %s/usage2case1",
getHdfsLocation().c_str())));
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/81d9de54/src/test/feature/ManagementTool/usage2case1/includedirectory.yml
----------------------------------------------------------------------
diff --git a/src/test/feature/ManagementTool/usage2case1/includedirectory.yml b/src/test/feature/ManagementTool/usage2case1/includedirectory.yml
deleted file mode 100644
index 00bfb56..0000000
--- a/src/test/feature/ManagementTool/usage2case1/includedirectory.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-AO_FileLocations:
-  Blocksize: 32768
-  Checksum: false
-  CompressionLevel: 0
-  CompressionType: null
-  Files:
-  - path: /usage2case1
-    size: 1016
-AO_Schema:
-- name: i
-  type: int4
-Bucketnum: 6
-DBVersion: PostgreSQL 8.2.15 (Greenplum Database 4.2.0 build 1) (HAWQ 2.0.1.0 build
-  dev) on x86_64-apple-darwin14.5.0, compiled by GCC Apple LLVM version 6.1.0 (clang-602.0.53)
-  (based on LLVM 3.6.0svn) compiled on Jul  6 2016 10:22:33
-DFS_URL: hdfs://@PORT@
-Distribution_Policy: DISTRIBUTED RANDOMLY
-Encoding: UTF8
-FileFormat: AO
-TableName: public.t
-Version: 1.0.0

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/81d9de54/src/test/feature/ManagementTool/usage2case1/includedirectory_tpl.yml
----------------------------------------------------------------------
diff --git a/src/test/feature/ManagementTool/usage2case1/includedirectory_tpl.yml b/src/test/feature/ManagementTool/usage2case1/includedirectory_tpl.yml
new file mode 100644
index 0000000..00bfb56
--- /dev/null
+++ b/src/test/feature/ManagementTool/usage2case1/includedirectory_tpl.yml
@@ -0,0 +1,21 @@
+AO_FileLocations:
+  Blocksize: 32768
+  Checksum: false
+  CompressionLevel: 0
+  CompressionType: null
+  Files:
+  - path: /usage2case1
+    size: 1016
+AO_Schema:
+- name: i
+  type: int4
+Bucketnum: 6
+DBVersion: PostgreSQL 8.2.15 (Greenplum Database 4.2.0 build 1) (HAWQ 2.0.1.0 build
+  dev) on x86_64-apple-darwin14.5.0, compiled by GCC Apple LLVM version 6.1.0 (clang-602.0.53)
+  (based on LLVM 3.6.0svn) compiled on Jul  6 2016 10:22:33
+DFS_URL: hdfs://@PORT@
+Distribution_Policy: DISTRIBUTED RANDOMLY
+Encoding: UTF8
+FileFormat: AO
+TableName: public.t
+Version: 1.0.0


Mime
View raw message