]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: flush op work queue prior to destroying MockImageCtx 7002/head
authorJason Dillaman <dillaman@redhat.com>
Mon, 21 Dec 2015 14:03:15 +0000 (09:03 -0500)
committerJason Dillaman <dillaman@redhat.com>
Mon, 21 Dec 2015 14:03:15 +0000 (09:03 -0500)
Fixes: #14092
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/test/librbd/mock/MockImageCtx.h

index bd29d498fd48a3e9dfab4093e4fb822bdf7a5a87..7368a52a23aa9bd4b53320877c376b27e86ff5d8 100644 (file)
@@ -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;