Github user paul-guo- commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/885#discussion_r77451727
  
    --- Diff: src/test/feature/ManagementTool/test_hawq_register.cpp ---
    @@ -369,3 +369,25 @@ TEST_F(TestHawqRegister, TestUsage2Behavior2) {
       util.execute("drop table simple_register_table;");
       util.execute("drop table new_simple_register_table;");
     }
    +
    +TEST_F(TestHawqRegister, TestUsage2ForceOption) {
    +  SQLUtility util;
    +  util.execute("drop table if exists simple_register_table_force;");
    +  util.execute("drop table if exists new_simple_register_table_force;");
    +  util.execute("create table simple_register_table_force(i int) with 
(appendonly=true, orientation=row) distributed randomly;");
    +  util.execute("insert into simple_register_table_force values(1), (2), 
(3);");
    +  EXPECT_EQ(0, Command::getCommandStatus("hawq extract -d " + (string) 
HAWQ_DB + " -o tmp.yml 
testhawqregister_testusage2forceoption.simple_register_table_force"));
    +  EXPECT_EQ(0, Command::getCommandStatus("hawq register -d " + (string) 
HAWQ_DB + " -c tmp.yml 
testhawqregister_testusage2forceoption.new_simple_register_table_force"));
    +  util.query("select * from new_simple_register_table_force;", 3);
    +
    +  util.execute("drop table if exists simple_register_table_force;");
    +  util.execute("create table simple_register_table_force(i int) with 
(appendonly=true, orientation=row) distributed randomly;");
    +  util.execute("insert into simple_register_table_force values(4), (5), 
(6), (7);");
    +  EXPECT_EQ(0, Command::getCommandStatus("hawq extract -d " + (string) 
HAWQ_DB + " -o tmp.yml 
testhawqregister_testusage2forceoption.simple_register_table_force"));
    +  EXPECT_EQ(0, Command::getCommandStatus("hawq register -d " + (string) 
HAWQ_DB + " -c tmp.yml --force 
testhawqregister_testusage2forceoption.new_simple_register_table_force"));
    +  util.query("select * from new_simple_register_table_force;", 4);
    +
    +  EXPECT_EQ(0, Command::getCommandStatus("rm -rf tmp.yml"));
    --- End diff --
    
    This is just for cleanup, maybe EXPECT_EQ is not required?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to