From 3498f999a862fffe399899a76115b6c9955c5a1e Mon Sep 17 00:00:00 2001 From: levy Date: Fri, 30 Jul 2021 12:10:50 +0800 Subject: [PATCH 1/3] fix: coredump in meta_service_test.check_status_failure --- src/meta/test/meta_service_test.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/meta/test/meta_service_test.cpp b/src/meta/test/meta_service_test.cpp index dc04c34faf..3abe01e261 100644 --- a/src/meta/test/meta_service_test.cpp +++ b/src/meta/test/meta_service_test.cpp @@ -6,6 +6,8 @@ #include "meta/meta_service.h" #include +#include +#include namespace dsn { namespace replication { @@ -70,6 +72,9 @@ class meta_service_test : public meta_test_base ::dsn::marshall(fake_request, request); dsn::message_ex *recvd_request = fake_request->copy(true, true); + std::unique_ptr sim_net( + new tools::sim_network_provider(nullptr, nullptr)); + recvd_request ->io_session = sim_net->create_client_session(rpc_address()); return app_env_rpc::auto_reply(recvd_request); } }; From 0eff872c5a39f27c38cbfb740bbe3830cf635c34 Mon Sep 17 00:00:00 2001 From: levy Date: Fri, 30 Jul 2021 12:12:16 +0800 Subject: [PATCH 2/3] fix --- src/meta/test/meta_service_test.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/meta/test/meta_service_test.cpp b/src/meta/test/meta_service_test.cpp index 3abe01e261..cc7bf6a88a 100644 --- a/src/meta/test/meta_service_test.cpp +++ b/src/meta/test/meta_service_test.cpp @@ -6,7 +6,6 @@ #include "meta/meta_service.h" #include -#include #include namespace dsn { From 3c50526c5f21069c1372ddf42bde9649ef7be21b Mon Sep 17 00:00:00 2001 From: levy Date: Fri, 30 Jul 2021 12:18:09 +0800 Subject: [PATCH 3/3] fix --- src/meta/test/meta_service_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/meta/test/meta_service_test.cpp b/src/meta/test/meta_service_test.cpp index cc7bf6a88a..21f861466d 100644 --- a/src/meta/test/meta_service_test.cpp +++ b/src/meta/test/meta_service_test.cpp @@ -72,8 +72,8 @@ class meta_service_test : public meta_test_base dsn::message_ex *recvd_request = fake_request->copy(true, true); std::unique_ptr sim_net( - new tools::sim_network_provider(nullptr, nullptr)); - recvd_request ->io_session = sim_net->create_client_session(rpc_address()); + new tools::sim_network_provider(nullptr, nullptr)); + recvd_request->io_session = sim_net->create_client_session(rpc_address()); return app_env_rpc::auto_reply(recvd_request); } };