diff --git a/src/dist/replication/test/meta_test/unit_test/server_state_test.cpp b/src/dist/replication/test/meta_test/unit_test/server_state_test.cpp index fedf284804..e1f5e146f3 100644 --- a/src/dist/replication/test/meta_test/unit_test/server_state_test.cpp +++ b/src/dist/replication/test/meta_test/unit_test/server_state_test.cpp @@ -80,7 +80,7 @@ void meta_service_test_app::app_envs_basic_test() request.__set_keys(keys); request.__set_values(values); - dsn::message_ex *binary_req = dsn::message_ex::create_request(RPC_CM_UPDATE_APP_ENV); + dsn::message_ptr binary_req = dsn::message_ex::create_request(RPC_CM_UPDATE_APP_ENV); dsn::marshall(binary_req, request); dsn::message_ex *recv_msg = create_corresponding_receive(binary_req); app_env_rpc rpc(recv_msg); // don't need reply @@ -102,7 +102,7 @@ void meta_service_test_app::app_envs_basic_test() request.__set_op(app_env_operation::type::APP_ENV_OP_DEL); request.__set_keys(del_keys); - dsn::message_ex *binary_req = dsn::message_ex::create_request(RPC_CM_UPDATE_APP_ENV); + dsn::message_ptr binary_req = dsn::message_ex::create_request(RPC_CM_UPDATE_APP_ENV); dsn::marshall(binary_req, request); dsn::message_ex *recv_msg = create_corresponding_receive(binary_req); app_env_rpc rpc(recv_msg); // don't need reply @@ -131,7 +131,7 @@ void meta_service_test_app::app_envs_basic_test() request.__set_op(app_env_operation::type::APP_ENV_OP_CLEAR); request.__set_clear_prefix(clear_prefix); - dsn::message_ex *binary_req = dsn::message_ex::create_request(RPC_CM_UPDATE_APP_ENV); + dsn::message_ptr binary_req = dsn::message_ex::create_request(RPC_CM_UPDATE_APP_ENV); dsn::marshall(binary_req, request); dsn::message_ex *recv_msg = create_corresponding_receive(binary_req); app_env_rpc rpc(recv_msg); // don't need reply @@ -163,7 +163,7 @@ void meta_service_test_app::app_envs_basic_test() request.__set_op(app_env_operation::type::APP_ENV_OP_CLEAR); request.__set_clear_prefix(""); - dsn::message_ex *binary_req = dsn::message_ex::create_request(RPC_CM_UPDATE_APP_ENV); + dsn::message_ptr binary_req = dsn::message_ex::create_request(RPC_CM_UPDATE_APP_ENV); dsn::marshall(binary_req, request); dsn::message_ex *recv_msg = create_corresponding_receive(binary_req); app_env_rpc rpc(recv_msg); // don't need reply diff --git a/src/dist/replication/test/meta_test/unit_test/update_configuration_test.cpp b/src/dist/replication/test/meta_test/unit_test/update_configuration_test.cpp index 24480b018f..e4db4135d9 100644 --- a/src/dist/replication/test/meta_test/unit_test/update_configuration_test.cpp +++ b/src/dist/replication/test/meta_test/unit_test/update_configuration_test.cpp @@ -23,7 +23,10 @@ class fake_sender_meta_service : public dsn::replication::meta_service public: fake_sender_meta_service(meta_service_test_app *app) : meta_service(), _app(app) {} - virtual void reply_message(dsn::message_ex *request, dsn::message_ex *response) override {} + virtual void reply_message(dsn::message_ex *request, dsn::message_ex *response) override + { + destroy_message(response); + } virtual void send_message(const dsn::rpc_address &target, dsn::message_ex *request) override { // we expect this is a configuration_update_request proposal