From e8911cfee7fcfaf23da2915ceba6f8844028d1d5 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Mon, 21 Dec 2015 09:03:15 -0500 Subject: [PATCH] tests: flush op work queue prior to destroying MockImageCtx Fixes: #14092 Signed-off-by: Jason Dillaman --- src/test/librbd/mock/MockImageCtx.h | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.47.3