Skip to content

Commit

Permalink
add(p2): test for deleting the only remaining node (#776)
Browse files Browse the repository at this point in the history
  • Loading branch information
unw9527 authored Nov 19, 2024
1 parent 9f8bddd commit 1964231
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/storage/b_plus_tree_delete_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ TEST(BPlusTreeTests, DISABLED_DeleteTestNoIterator) {
}
}
EXPECT_EQ(size, 1);

// Remove the remaining key
index_key.SetFromInteger(2);
tree.Remove(index_key);
auto root_page_id = tree.GetRootPageId();
ASSERT_EQ(root_page_id, INVALID_PAGE_ID);

delete bpm;
}

Expand Down

0 comments on commit 1964231

Please sign in to comment.