Speedup test case

This commit is contained in:
Sebastian Messmer 2015-02-24 22:46:44 +01:00
parent 7f55285ecd
commit 81ab18f595
5 changed files with 10 additions and 9 deletions

View File

@ -30,7 +30,7 @@ TEST_F(DataTreeStoreTest, TreeIsNotLoadableAfterRemove) {
}
TEST_F(DataTreeStoreTest, RemovingTreeRemovesAllNodesOfTheTree) {
auto key = CreateFullThreeLevel()->key();
auto key = CreateThreeLevelMinData()->key();
auto tree1 = treeStore.load(key);
auto tree2_key = treeStore.createNewTree()->key();

View File

@ -30,13 +30,6 @@ unique_ptr<DataInnerNode> DataTreeShrinkingTest::CreateTwoInnerNodeTwoOneLeaves(
});
}
unique_ptr<DataInnerNode> DataTreeShrinkingTest::CreateThreeLevelMinData() {
return CreateInner({
CreateFullTwoLevel(),
CreateInner({CreateLeaf()})
});
}
unique_ptr<DataInnerNode> DataTreeShrinkingTest::CreateFourLevelMinData() {
return CreateInner({
CreateFullThreeLevel(),

View File

@ -16,7 +16,6 @@ public:
std::unique_ptr<blobstore::onblocks::datanodestore::DataInnerNode> CreateFourNodeThreeLeaf();
std::unique_ptr<blobstore::onblocks::datanodestore::DataInnerNode> CreateTwoInnerNodeOneTwoLeaves();
std::unique_ptr<blobstore::onblocks::datanodestore::DataInnerNode> CreateTwoInnerNodeTwoOneLeaves();
std::unique_ptr<blobstore::onblocks::datanodestore::DataInnerNode> CreateThreeLevelMinData();
std::unique_ptr<blobstore::onblocks::datanodestore::DataInnerNode> CreateFourLevelMinData();
std::unique_ptr<blobstore::onblocks::datanodestore::DataInnerNode> CreateFourLevelWithTwoSiblingLeaves1();
std::unique_ptr<blobstore::onblocks::datanodestore::DataInnerNode> CreateFourLevelWithTwoSiblingLeaves2();

View File

@ -68,6 +68,13 @@ unique_ptr<DataInnerNode> DataTreeTest::CreateFullTwoLevel() {
return root;
}
unique_ptr<DataInnerNode> DataTreeTest::CreateThreeLevelMinData() {
return CreateInner({
CreateFullTwoLevel(),
CreateInner({CreateLeaf()})
});
}
unique_ptr<DataInnerNode> DataTreeTest::CreateFullThreeLevel() {
auto root = CreateInner({CreateFullTwoLevel().get()});
FillNodeTwoLevel(root.get());

View File

@ -27,6 +27,8 @@ public:
std::unique_ptr<blobstore::onblocks::datanodestore::DataInnerNode> CreateFullTwoLevel();
std::unique_ptr<blobstore::onblocks::datanodestore::DataInnerNode> CreateFullThreeLevel();
std::unique_ptr<blobstore::onblocks::datanodestore::DataInnerNode> CreateThreeLevelMinData();
std::unique_ptr<blobstore::onblocks::datanodestore::DataInnerNode> LoadInnerNode(const blockstore::Key &key);
std::unique_ptr<blobstore::onblocks::datanodestore::DataLeafNode> LoadLeafNode(const blockstore::Key &key);