diff --git a/src/lib/grpc_factory.cpp b/src/lib/grpc_factory.cpp index ffbeffa..9465691 100644 --- a/src/lib/grpc_factory.cpp +++ b/src/lib/grpc_factory.cpp @@ -156,7 +156,7 @@ nuraft::ptr< nuraft::rpc_client > grpc_factory::create_client(peer_id_t const& c if (!happened) { LOGD("Re-creating client for {}", client); if (auto err = reinit_client(client, it->second); nuraft::OK != err) { - LOGE("Failed to re-initialize client {}: {}", client, err); + LOGW("Failed to re-initialize client {}: {}", client, err); new_client = std::make_shared< grpc_error_client >(); } else { new_client = it->second; diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index e7b8416..99a9a39 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -18,6 +18,6 @@ if (jungle_FOUND) GTest::gmock ) - add_test(NAME MessagingTest COMMAND messaging_test -cv 0) + add_test(NAME MessagingTest COMMAND messaging_test -cv 4) set_property(TEST MessagingTest PROPERTY RUN_SERIAL 1) endif () diff --git a/src/tests/MessagingTest.cpp b/src/tests/MessagingTest.cpp index d1c4e03..074ebb4 100644 --- a/src/tests/MessagingTest.cpp +++ b/src/tests/MessagingTest.cpp @@ -51,6 +51,7 @@ class TestApplication : public MessagingApplication, public std::enable_shared_f uint32_t port_; boost::uuids::uuid id_; std::shared_ptr< Manager > instance_; + bool data_svc_; std::map< group_id_t, std::shared_ptr< test_state_mgr > > state_mgr_map_; @@ -70,7 +71,7 @@ class TestApplication : public MessagingApplication, public std::enable_shared_f auto [it, happened] = state_mgr_map_.try_emplace(group_id, std::make_shared< test_state_mgr >(srv_id, id_, group_id)); RELEASE_ASSERT(happened, "Failed!"); - it->second->register_data_service_apis(instance_.get()); + if (data_svc_) it->second->register_data_service_apis(instance_.get()); return std::static_pointer_cast< mesg_state_mgr >(it->second); } @@ -80,6 +81,7 @@ class TestApplication : public MessagingApplication, public std::enable_shared_f } void start(bool data_svc_enabled = false) { + data_svc_ = data_svc_enabled; auto params = Manager::Params(); params.server_uuid_ = id_; params.mesg_port_ = port_;