[unit-tests/btree_counter_t] Add a couple of flushes().

This fixes the two failing btree_counter tests.  The blocknr in each
node is filled in when written out.  These days (thanks to Ming) the
counter also checks the btree, *but* if there are any problems
encoutered it just skips counting that node.
This commit is contained in:
Joe Thornber 2017-09-14 14:00:21 +01:00
parent eeb66ad83a
commit 977bbf05e5

View File

@ -61,6 +61,7 @@ namespace {
TEST_F(BTreeCounterTests, count_empty_tree)
{
tree_.reset(new btree<1, uint64_traits>(tm_, rc_));
tm_.get_bm()->flush();
check_nr_metadata_blocks_is_ge(1);
}
@ -73,6 +74,7 @@ TEST_F(BTreeCounterTests, count_populated_tree)
tree_->insert(key, 0ull);
}
tm_.get_bm()->flush();
check_nr_metadata_blocks_is_ge(40);
}