Skip to content

Commit

Permalink
Merge pull request #7002 from dillaman/wip-14092-jewel
Browse files Browse the repository at this point in the history
tests: flush op work queue prior to destroying MockImageCtx

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
  • Loading branch information
jdurgin committed Dec 21, 2015
2 parents 0a4b7ab + e8911cf commit df9ff25
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/test/librbd/mock/MockImageCtx.h
Expand Up @@ -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"

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit df9ff25

Please sign in to comment.