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

Transaction test rewrite #2029

Merged
merged 2 commits into from
Sep 16, 2023
Merged

Transaction test rewrite #2029

merged 2 commits into from
Sep 16, 2023

Conversation

hououou
Copy link
Collaborator

@hououou hououou commented Sep 13, 2023

I have read and agree to the terms under CLA.md.
I have made the following changes:

  • Expand test_framework to support
    • multiple connection test
    • set checkpoint_time_out
    • reload database
  • Rewrite manual transaction set test (done) and int_delete_create_transaction (in process)

@hououou hououou marked this pull request as draft September 13, 2023 03:47
@ray6080 ray6080 changed the title transaction_test_rewrite Transaction test rewrite Sep 13, 2023
test/runner/e2e_test.cpp Outdated Show resolved Hide resolved
test/graph_test/graph_test.cpp Show resolved Hide resolved
test/include/graph_test/graph_test.h Outdated Show resolved Hide resolved
test/runner/e2e_test.cpp Outdated Show resolved Hide resolved
test/test_runner/test_runner.cpp Outdated Show resolved Hide resolved
test/test_runner/test_parser.cpp Show resolved Hide resolved
test/test_runner/test_parser.cpp Show resolved Hide resolved
test/runner/e2e_test.cpp Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Sep 16, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01% ⚠️

Comparison is base (0eed60d) 90.15% compared to head (ece2d01) 90.15%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2029      +/-   ##
==========================================
- Coverage   90.15%   90.15%   -0.01%     
==========================================
  Files         937      937              
  Lines       33362    33362              
==========================================
- Hits        30078    30076       -2     
- Misses       3284     3286       +2     

see 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@andyfengHKU andyfengHKU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also remove the cpp test files after migrating

@@ -157,10 +164,24 @@ class DBTest : public BaseGraphTest {
initGraph();
}

inline void runTest(const std::vector<std::unique_ptr<TestStatement>>& statements) {
TestRunner::runTest(statements, *conn, databasePath);
inline void runTest(const std::vector<std::unique_ptr<TestStatement>>& statements,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put implementation in cpp.

Personally I'm not a big fun of using default parameters. Usually I just overload the function, i.e.

runTest(statements);
runTest(statements, checkpointWaitTimeout, connNames);

But you can decide this.

test/include/graph_test/graph_test.h Show resolved Hide resolved
test/include/test_runner/test_group.h Show resolved Hide resolved
test/include/test_runner/test_group.h Show resolved Hide resolved
test/include/test_runner/test_group.h Show resolved Hide resolved
@@ -31,6 +36,12 @@ struct TestGroup {
std::unordered_map<std::string, std::vector<std::unique_ptr<TestStatement>>>
testCasesStatementBlocks;
uint64_t bufferPoolSize = common::BufferPoolConstants::DEFAULT_BUFFER_POOL_SIZE_FOR_TESTING;
// for multiple connections
uint64_t checkpointWaitTimeout =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not really for multiple connections so move this line above the comment. Also @ray6080 should comment if this config will exist in the long term. I feel we might remove it at some point.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will exist for quite a long time.

@hououou hououou merged commit ea5d3b3 into kuzudb:master Sep 16, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants