]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librbd: skip expect object request send when skip_partial_discard on 12645/head
authorGui Hecheng <guihecheng@cmss.chinamobile.com>
Thu, 23 Feb 2017 09:17:15 +0000 (17:17 +0800)
committerGui Hecheng <guihecheng@cmss.chinamobile.com>
Fri, 24 Feb 2017 01:31:14 +0000 (09:31 +0800)
With skip_partial_discard on, there may be no object request send calls,
because they are skipped.

Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
src/test/librbd/io/test_mock_ImageRequest.cc

index 3cb0ffcc5c31b36e31975e41fedf7303dde3b000..3a5d2fee3732e8660442c5ffe0b038d9a7c9e9c3 100644 (file)
@@ -241,7 +241,9 @@ TEST_F(TestMockIoImageRequest, AioDiscardJournalAppendDisabled) {
 
   InSequence seq;
   expect_is_journal_appending(mock_journal, false);
-  expect_object_request_send(mock_image_ctx, mock_aio_object_request, 0);
+  if (!ictx->skip_partial_discard) {
+    expect_object_request_send(mock_image_ctx, mock_aio_object_request, 0);
+  }
 
   C_SaferCond aio_comp_ctx;
   AioCompletion *aio_comp = AioCompletion::create_and_start(