Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converted order_by and copy tests to the new format #1526

Merged
merged 1 commit into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions test/copy/copy_csv_parquet_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,6 @@ using namespace kuzu::common;
using namespace kuzu::storage;
using namespace kuzu::testing;

class CopyNodeFromCSVTest : public DBTest {
std::string getInputDir() override {
return TestHelper::appendKuzuRootPath("dataset/copy-test/node/csv/");
}
};

TEST_F(CopyNodeFromCSVTest, CopyNodeTest) {
runTest(TestHelper::appendKuzuRootPath("test/test_files/copy/copy_node.test"));
}

class CopyNodeFromParquetTest : public DBTest {
std::string getInputDir() override {
return TestHelper::appendKuzuRootPath("dataset/copy-test/node/parquet/");
}
};

TEST_F(CopyNodeFromParquetTest, CopyNodeTest) {
runTest(TestHelper::appendKuzuRootPath("test/test_files/copy/copy_node.test"));
}

class CopyNodeWrongPathTest : public BaseGraphTest {
public:
void SetUp() override {
Expand Down
4 changes: 2 additions & 2 deletions test/include/test_helper/test_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ class TestHelper {
static void initializeConnection(TestQueryConfig* config, Connection& conn);
static bool testQuery(TestQueryConfig* config, Connection& conn);
static void setConfigValue(
const std::string& line, std::string& configValue, const std::string& configKey);
const std::string& line, std::string& configItem, const std::string& configKey);
static void setConfigValue(
const std::string& line, bool& configValue, const std::string& configKey);
const std::string& line, bool& configItem, const std::string& configKey);
static std::string extractConfigValue(const std::string& line, const std::string& configKey);
};

Expand Down
1 change: 0 additions & 1 deletion test/runner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ add_kuzu_test(e2e_copy_csv_transaction_test e2e_copy_transaction_test.cpp)
add_kuzu_test(e2e_ddl_test e2e_ddl_test.cpp)
add_kuzu_test(e2e_delete_create_transaction_test e2e_delete_create_transaction_test.cpp)
add_kuzu_test(e2e_exception_test e2e_exception_test.cpp)
add_kuzu_test(e2e_order_by_test e2e_order_by_test.cpp)
add_kuzu_test(e2e_read_test e2e_read_test.cpp)
add_kuzu_test(e2e_set_transaction_test e2e_set_transaction_test.cpp)
add_kuzu_test(e2e_update_node_test e2e_update_node_test.cpp)
Expand Down
21 changes: 0 additions & 21 deletions test/runner/e2e_order_by_test.cpp

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

-NAME SubsetTest
-QUERY MATCH (row:tableOfTypes) WHERE row.id >= 20 AND row.id <= 24 RETURN *;
---- 5
Expand Down
4 changes: 4 additions & 0 deletions test/test_files/copy/csv/test.group
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-GROUP CopyNodeFromCSVTest
-TEST CopyNodeTest
-DATASET copy-test/node/csv
-READ_ONLY TRUE
48 changes: 48 additions & 0 deletions test/test_files/copy/parquet/copy_node.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
-NAME SubsetTest
-QUERY MATCH (row:tableOfTypes) WHERE row.id >= 20 AND row.id <= 24 RETURN *;
---- 5
(label:tableOfTypes, 0:20, {id:20, int64Column:0, doubleColumn:57.579280, booleanColumn:True, dateColumn:1731-09-26, timestampColumn:1731-09-26 03:30:08, stringColumn:OdM})
(label:tableOfTypes, 0:21, {id:21, int64Column:7, doubleColumn:64.630960, booleanColumn:False, dateColumn:1307-01-26, timestampColumn:1307-01-26 03:31:08, stringColumn:AjbxHQThEtDDlOjbzMjCQSXlvGQEjcFLykESrnFHwPKX})
(label:tableOfTypes, 0:22, {id:22, int64Column:71, doubleColumn:37.963386, booleanColumn:True, dateColumn:1455-07-26, timestampColumn:1455-07-26 03:07:03, stringColumn:dRvHHdyNXYfSUcicaxBoQEKQUfgex})
(label:tableOfTypes, 0:23, {id:23, int64Column:58, doubleColumn:42.774957, booleanColumn:False, dateColumn:1181-10-16, timestampColumn:1181-10-16 18:19:43, stringColumn:ISImRVpUjynGMFRQyYmeIUVjM})
(label:tableOfTypes, 0:24, {id:24, int64Column:75, doubleColumn:53.813224, booleanColumn:False, dateColumn:1942-10-24, timestampColumn:1942-10-24 09:30:16, stringColumn:naDlQ})

-NAME CheckNumLinesTest
-QUERY MATCH (row:tableOfTypes) RETURN count(*)
---- 1
49999

-NAME CountTrueTest
-QUERY MATCH (row:tableOfTypes) WHERE row.booleanColumn = True RETURN count(*)
---- 1
24997

-NAME CountFalseTest
-QUERY MATCH (row:tableOfTypes) WHERE row.booleanColumn = False RETURN count(*)
---- 1
25002

-NAME CheckSumTest
-QUERY MATCH (row:tableOfTypes) RETURN sum(row.id), sum(row.int64Column), sum(row.doubleColumn)
---- 1
1249925001|2500180|2504542.349696

-NAME EmptyStringTest
-QUERY MATCH (row:tableOfTypes) WHERE row.id = 49992 RETURN *;
---- 1
(label:tableOfTypes, 0:49992, {id:49992, int64Column:50, doubleColumn:31.582059, booleanColumn:False, dateColumn:1551-07-19, timestampColumn:1551-07-19 16:28:31, stringColumn:})

-NAME FloatTest
-QUERY MATCH (row:tableOfTypes) WHERE row.doubleColumn = 68.73718401556897 RETURN row.dateColumn;
---- 1
1042-06-05

-NAME DateTest
-QUERY MATCH (row:tableOfTypes) WHERE row.id = 25531 RETURN *;
---- 1
(label:tableOfTypes, 0:25531, {id:25531, int64Column:77, doubleColumn:28.417543, booleanColumn:False, dateColumn:1895-03-13, timestampColumn:1895-03-13 04:31:22, stringColumn:XB})

-NAME IntervalTest
-QUERY MATCH (row:tableOfTypes) WHERE 0 <= row.doubleColumn AND row.doubleColumn <= 10 AND 0 <= row.int64Column AND row.int64Column <= 10 RETURN count(*);
---- 1
546
4 changes: 4 additions & 0 deletions test/test_files/copy/parquet/test.group
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-GROUP CopyNodeFromParquetTest
-TEST CopyNodeTest
-DATASET copy-test/node/parquet
-READ_ONLY TRUE
5 changes: 5 additions & 0 deletions test/test_files/order_by/test.group
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-GROUP OrderByTests
-TEST OrderByLargeDatasetTest
-DATASET order-by-tests
-CHECK_ORDER TRUE
-READ_ONLY TRUE