Skip to content

Commit 71c9154

Browse files
committed
osd: Fix extent cache unit test
Signed-off-by: Alex Ainscow <[email protected]>
1 parent bd9d44d commit 71c9154

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/osd/test_extent_cache.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ TEST(ECExtentCache, test_invalidate)
597597
ASSERT_FALSE(result++->empty());
598598
ASSERT_TRUE(result++->empty());
599599
ASSERT_TRUE(result++->empty());
600-
ASSERT_TRUE(result++->empty());
600+
ASSERT_FALSE(result++->empty());
601601
cl.complete_write(*op1);
602602
cl.complete_write(*op2);
603603
cl.complete_write(*op3);
@@ -629,7 +629,7 @@ TEST(ECExtentCache, test_invalidate_lru)
629629
auto io2 = iset_from_vector({{{align_prev(18*bs), align_next(19*bs) - align_prev(18*bs)}}}, cl.get_stripe_info());
630630
io2[shard_id_t(k)].insert(io1.get_extent_superset());
631631
io2[shard_id_t(k+1)].insert(io1.get_extent_superset());
632-
// io 3 is the truncate
632+
// io 3 is the truncate (This does the invalidate)
633633
auto io3 = shard_extent_set_t(cl.sinfo.get_k_plus_m());
634634
auto io4 = iset_from_vector({{{align_prev(30*bs), align_next(31*bs) - align_prev(30*bs)}}}, cl.get_stripe_info());
635635
io3[shard_id_t(k)].insert(io1.get_extent_superset());
@@ -662,7 +662,7 @@ TEST(ECExtentCache, test_invalidate_lru)
662662
cl.complete_write(*op2);
663663
op2.reset();
664664

665-
optional op3 = cl.cache.prepare(cl.oid, nullopt, io3, align_next(36*bs), 0, false,
665+
optional op3 = cl.cache.prepare(cl.oid, nullopt, io3, align_next(36*bs), 0, true,
666666
[&cl](ECExtentCache::OpRef &op)
667667
{
668668
cl.cache_ready(op->get_hoid(), op->get_result());

0 commit comments

Comments
 (0)