Skip to content

Commit

Permalink
update test/ogawayama/stub/endpoint.h to handle UpdateExpirationTime
Browse files Browse the repository at this point in the history
  • Loading branch information
t-horikawa committed Jul 18, 2024
1 parent 860607f commit 9da2776
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/ogawayama/stub/endpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,22 @@ class endpoint {
auto reply_message = ss.str();
wire_->get_response_wire().write(reply_message.data(), tateyama::common::wire::response_header(index, reply_message.length(), RESPONSE_HANDSHAKE));
continue;
} else if (service_id == tateyama::framework::service_id_routing) {
std::stringstream ss{};
::tateyama::proto::framework::response::Header header{};
if(auto res = tateyama::utils::SerializeDelimitedToOstream(header, std::addressof(ss)); ! res) {
throw std::runtime_error("error formatting response message");
}
tateyama::proto::core::response::UpdateExpirationTime rp{};
(void) rp.mutable_success();
auto body = rp.SerializeAsString();
if(auto res = tateyama::utils::PutDelimitedBodyToOstream(body, std::addressof(ss)); ! res) {
throw std::runtime_error("error formatting response message");
}
rp.clear_success();
auto reply_message = ss.str();
wire_->get_response_wire().write(reply_message.data(), tateyama::common::wire::response_header(index, reply_message.length(), RESPONSE_HANDSHAKE));
continue;
}
}

Expand Down

0 comments on commit 9da2776

Please sign in to comment.