Skip to content

Commit 41775bd

Browse files
authored
fix(p4): update deadlock detection test cases (#563)
Signed-off-by: Alex Chi <[email protected]>
1 parent 76e7e81 commit 41775bd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/concurrency/deadlock_detection_test.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
namespace bustub {
1515
TEST(LockManagerDeadlockDetectionTest, DISABLED_EdgeTest) {
1616
LockManager lock_mgr{};
17+
TransactionManager txn_mgr{&lock_mgr};
18+
lock_mgr.txn_manager_ = &txn_mgr;
19+
lock_mgr.StartDeadlockDetection();
1720

1821
const int num_nodes = 100;
1922
const int num_edges = num_nodes / 2;
@@ -57,6 +60,8 @@ TEST(LockManagerDeadlockDetectionTest, DISABLED_EdgeTest) {
5760
TEST(LockManagerDeadlockDetectionTest, DISABLED_BasicDeadlockDetectionTest) {
5861
LockManager lock_mgr{};
5962
TransactionManager txn_mgr{&lock_mgr};
63+
lock_mgr.txn_manager_ = &txn_mgr;
64+
lock_mgr.StartDeadlockDetection();
6065

6166
table_oid_t toid{0};
6267
RID rid0{0, 0};

0 commit comments

Comments
 (0)