Skip to content

Commit

Permalink
fix the bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hououou committed Sep 16, 2023
1 parent 5f4bdb4 commit ece2d01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/include/graph_test/graph_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ class DBTest : public BaseGraphTest {
common::DEFAULT_CHECKPOINT_WAIT_TIMEOUT_FOR_TRANSACTIONS_TO_LEAVE_IN_MICROS,
std::set<std::string> connNames = std::set<std::string>()) {
for (auto& statement : statements) {
auto conn_name = *statement->conn_name;
if (statement->reLoadDBFlag) {
createDB(checkpointWaitTimeout);
createConns(connNames);
Expand All @@ -178,6 +177,7 @@ class DBTest : public BaseGraphTest {
if (conn) {
TestRunner::runTest(statement.get(), *conn, databasePath);
} else {
auto conn_name = *statement->conn_name;
TestRunner::runTest(statement.get(), *connMap[conn_name], databasePath);
}
}
Expand Down
6 changes: 3 additions & 3 deletions test/test_runner/test_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ void TestParser::extractStatementBlock() {
auto statement = std::make_unique<TestStatement>();
extractStatement(statement.get(), blockName);
testGroup->testCasesStatementBlocks[blockName].push_back(std::move(statement));
testGroup->testCasesConnNames[blockName] = std::set<std::string>();
}
}
}
Expand Down Expand Up @@ -310,8 +311,7 @@ void TestParser::addStatementBlock(const std::string& blockName, const std::stri
for (const auto& statementPtr : testGroup->testCasesStatementBlocks[blockName]) {
testGroup->testCases[testCaseName].push_back(
std::make_unique<TestStatement>(*statementPtr));
testGroup->testCasesConnNames[testCaseName] =
std::move(testGroup->testCasesConnNames[blockName]);
testGroup->testCasesConnNames[testCaseName] = testGroup->testCasesConnNames[blockName];
}
} else {
throw TestException("Statement block not found [" + path + ":" + blockName + "].");
Expand All @@ -322,7 +322,7 @@ TestStatement* TestParser::addNewStatement(std::string& testGroupName) {
auto statement = std::make_unique<TestStatement>();
TestStatement* currentStatement = statement.get();
testGroup->testCases[testGroupName].push_back(std::move(statement));
// testCaseConnNames=testGroup->testCasesConnNames[testGroupName];
// testGroup->testCasesConnNames[testGroupName]=std::set<std::string>();
return currentStatement;
}

Expand Down

0 comments on commit ece2d01

Please sign in to comment.