Skip to content

Commit

Permalink
Rename types
Browse files Browse the repository at this point in the history
  • Loading branch information
rfdavid committed Aug 15, 2023
1 parent 5ea91ba commit f93285f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions test/include/test_runner/test_group.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once
BEGIN_WRITE_TRX#pragma once

#include "main/kuzu.h"

Expand All @@ -19,12 +19,12 @@ struct TestStatement {
bool checkOutputOrder = false;
std::string expectedTuplesCSVFile;
enum class TransactionCmdType {
NONE,
WRITE,
READ_ONLY,
AUTO_COMMIT,
BEGIN_WRITE_TRX,
BEGIN_READ_TRX,
COMMIT,
ROLLBACK
} transactionCmdType = TransactionCmdType::NONE;
} transactionCmdType = TransactionCmdType::AUTO_COMMIT;
};

// Test group is a collection of test cases in a single file.
Expand Down
4 changes: 2 additions & 2 deletions test/test_runner/test_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ TestStatement* TestParser::extractStatement(TestStatement* statement) {
break;
}
case TokenType::BEGIN_WRITE_TRANSACTION: {
statement->transactionCmdType = TestStatement::TransactionCmdType::WRITE;
statement->transactionCmdType = TestStatement::TransactionCmdType::BEGIN_WRITE_TRX;
return statement;
}
case TokenType::BEGIN_READ_ONLY_TRANSACTION: {
statement->transactionCmdType = TestStatement::TransactionCmdType::READ_ONLY;
statement->transactionCmdType = TestStatement::TransactionCmdType::BEGIN_READ_TRX;
return statement;
}
case TokenType::COMMIT: {
Expand Down
4 changes: 2 additions & 2 deletions test/test_runner/test_runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ void TestRunner::runTest(const std::vector<std::unique_ptr<TestStatement>>& stat
spdlog::info("QUERY: {}", statement->query);
conn.setMaxNumThreadForExec(statement->numThreads);
switch (statement->transactionCmdType) {
case TestStatement::TransactionCmdType::WRITE:
case TestStatement::TransactionCmdType::BEGIN_WRITE_TRX:
conn.beginWriteTransaction();
break;
case TestStatement::TransactionCmdType::READ_ONLY:
case TestStatement::TransactionCmdType::BEGIN_READ_TRX:
conn.beginReadOnlyTransaction();
break;
case TestStatement::TransactionCmdType::COMMIT:
Expand Down

0 comments on commit f93285f

Please sign in to comment.