hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ictmalili <...@git.apache.org>
Subject [GitHub] incubator-hawq pull request: HAWQ-760. Add hawq register to suppor...
Date Tue, 31 May 2016 05:50:51 GMT
Github user ictmalili commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/679#discussion_r65126284
  
    --- Diff: src/test/feature/testhawqregister/test-hawq-register.cpp ---
    @@ -0,0 +1,80 @@
    +#include <string>
    +
    +#include "lib/command.h"
    +#include "lib/common.h"
    +#include "lib/sql-util.h"
    +
    +#include "gtest/gtest.h"
    +
    +using std::string;
    +
    +/* This test suite may consume more than 80 seconds. */
    +class TestHawqRegister : public ::testing::Test {
    + public:
    +  TestHawqRegister() {}
    +  ~TestHawqRegister() {}
    +};
    +
    +TEST_F(TestHawqRegister, TestSingleFile) {
    +	SQLUtility util;
    +	string rootPath(util.getTestRootPath()); 
    +	string relativePath("/testhawqregister/test_hawq.paq");
    +	string filePath = rootPath + relativePath;
    +
    +	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath + " /hawq_register_hawq.paq"));
    +
    +	util.execute("create table hawqregister(i int) with (appendonly=true, orientation=parquet);");
    +	util.query("select * from hawqregister;", 0);
    +
    +	EXPECT_EQ(0, Command::getCommandStatus("hawq register postgres hawqregister /hawq_register_hawq.paq"));
    +
    +	util.query("select * from hawqregister;", 3);
    +	util.execute("insert into hawqregister values(1);");
    +	util.query("select * from hawqregister;", 4);
    +}
    +
    +TEST_F(TestHawqRegister, TestSingleHiveFile) {
    --- End diff --
    
     @Oliver-Luo Have you written tests about all the types? It would be better to check all
the types we support.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message