Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit fa400ec

Browse files
authored
Merge pull request #1238 from pervazea/mem_leaks
Memory leak fixes for the unit tests
2 parents c28873c + 09cd235 commit fa400ec

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

test/optimizer/optimizer_rule_test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ TEST_F(OptimizerRuleTests, SimpleAssociativeRuleTest) {
162162
auto child_join_op = output_join->Children()[1]->Op().As<LogicalInnerJoin>();
163163
EXPECT_EQ(2, parent_join_op->join_predicates.size());
164164
EXPECT_EQ(0, child_join_op->join_predicates.size());
165+
delete root_context;
165166
}
166167

167168
TEST_F(OptimizerRuleTests, SimpleAssociativeRuleTest2) {
@@ -256,6 +257,7 @@ TEST_F(OptimizerRuleTests, SimpleAssociativeRuleTest2) {
256257
auto child_join_op = output_join->Children()[1]->Op().As<LogicalInnerJoin>();
257258
EXPECT_EQ(1, parent_join_op->join_predicates.size());
258259
EXPECT_EQ(1, child_join_op->join_predicates.size());
260+
delete root_context;
259261
}
260262

261263
} // namespace test

test/planner/plan_util_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ TEST_F(PlanUtilTests, GetAffectedIndexesTest) {
163163

164164
// no indexes are affected
165165
EXPECT_EQ(0, static_cast<int>(affected_indexes.size()));
166+
txn_manager.CommitTransaction(txn);
166167
}
167168

168169
} // namespace test

0 commit comments

Comments
 (0)