]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librados_test_stub: ensure the log flusher thread is started
authorJason Dillaman <dillaman@redhat.com>
Tue, 2 Apr 2019 20:34:56 +0000 (16:34 -0400)
committerSage Weil <sage@redhat.com>
Fri, 5 Apr 2019 13:30:11 +0000 (08:30 -0500)
Recent changes merged in cd6a5b9c40779956629803f222c365bdb291a169
resulted in the logger flusher thread never being started for
librados_test_stub-derived unit tests.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 4a8a0ac63175afecfd22df9252d2b556420ff846)

src/test/librados_test_stub/LibradosTestStub.cc

index e8053b0762e739670bafcc8ca0354a4123d46e20..f82d5130d5aeb5dcab93f42b2b775d09059d4972 100644 (file)
@@ -5,11 +5,13 @@
 #include "include/rados/librados.hpp"
 #include "include/stringify.h"
 #include "common/ceph_argparse.h"
+#include "common/ceph_context.h"
 #include "common/common_init.h"
 #include "common/config.h"
 #include "common/debug.h"
 #include "common/snap_types.h"
 #include "librados/AioCompletionImpl.h"
+#include "log/Log.h"
 #include "test/librados_test_stub/TestClassHandler.h"
 #include "test/librados_test_stub/TestIoCtxImpl.h"
 #include "test/librados_test_stub/TestRadosClient.h"
@@ -104,6 +106,7 @@ librados::TestRadosClient *create_rados_client() {
   CephContext *cct = common_preinit(iparams, CODE_ENVIRONMENT_LIBRARY, 0);
   cct->_conf.parse_env(cct->get_module_type());
   cct->_conf.apply_changes(nullptr);
+  cct->_log->start();
 
   auto rados_client =
     librados_test_stub::get_cluster()->create_rados_client(cct);