From: Jason Dillaman Date: Mon, 21 Dec 2015 14:03:15 +0000 (-0500) Subject: tests: flush op work queue prior to destroying MockImageCtx X-Git-Tag: v10.0.2~20^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F7002%2Fhead;p=ceph.git tests: flush op work queue prior to destroying MockImageCtx Fixes: #14092 Signed-off-by: Jason Dillaman --- diff --git a/src/test/librbd/mock/MockImageCtx.h b/src/test/librbd/mock/MockImageCtx.h index bd29d498fd48..7368a52a23aa 100644 --- a/src/test/librbd/mock/MockImageCtx.h +++ b/src/test/librbd/mock/MockImageCtx.h @@ -12,6 +12,7 @@ #include "test/librbd/mock/MockObjectMap.h" #include "test/librbd/mock/MockReadahead.h" #include "common/RWLock.h" +#include "common/WorkQueue.h" #include "librbd/ImageCtx.h" #include "gmock/gmock.h" @@ -56,6 +57,7 @@ struct MockImageCtx { ~MockImageCtx() { wait_for_async_requests(); + image_ctx->op_work_queue->drain(); delete image_watcher; delete op_work_queue; delete aio_work_queue;