test: fix bluestore unshare blob test case

Ensure async queue_transactions of remove op on cloned
object happens before KV range scan, otherwise assertion
on the number of shared blob may failed.

Signed-off-by: Tongliang Deng <dengtongliang@sensetime.com>
This commit is contained in:
Tongliang Deng 2021-12-29 20:37:55 +08:00
parent d70fdd74b9
commit 984c014416

View File

@ -3807,6 +3807,13 @@ TEST_P(StoreTest, BlueStoreUnshareBlobTest) {
r = queue_transaction(store, ch, std::move(t4));
ASSERT_EQ(r, 0);
{
// this ensures remove operation submitted to kv store
EXPECT_EQ(store->umount(), 0);
EXPECT_EQ(store->mount(), 0);
ch = store->open_collection(cid);
}
bufferlist resdata;
r = store->read(ch, hoid, 0, 0x2000, resdata);
ASSERT_EQ(r, 0x2000);