MB-21428: Make sure all tasks in fake executor pool finish execution in teardown 68/68968/2
authorManu Dhundi <manu@couchbase.com>
Wed, 19 Oct 2016 23:11:09 +0000 (16:11 -0700)
committerDave Rigby <daver@couchbase.com>
Thu, 20 Oct 2016 08:45:45 +0000 (08:45 +0000)
It is not sufficient to just run all tasks in future and ready queues while
shutdown, we also need to make sure they finish before delete
EventuallyPersistentEngine instance.

Change-Id: I658a2176b6f4a99beacbc8dd2e010b93c4480eaa
Reviewed-on: http://review.couchbase.org/68968
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>
tests/module_tests/evp_store_single_threaded_test.cc

index 2159315..ef4fbc8 100644 (file)
@@ -102,6 +102,8 @@ protected:
                 }
             };
             runTasks(*task_executor->getLpTaskQ()[t]);
+            task_executor->stopTaskGroup(engine->getTaskable().getGID(), t,
+                                         engine->getEpStats().forceShutdown);
         }
     }