Skip to content

Commit

Permalink
test,rpc: Extend simple ping-pong case
Browse files Browse the repository at this point in the history
By default RPC client uses new frames, that include handler execution
time. Tune up one simple test to validate that legacy frames still work
too.

Signed-off-by: Pavel Emelyanov <[email protected]>
  • Loading branch information
xemul committed Jun 25, 2024
1 parent 41ee6ee commit 595ae18
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/unit/rpc_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ SEASTAR_TEST_CASE(test_rpc_connect) {

for (auto i = 0; i < 2; i++) {
for (auto j = 0; j < 4; j++) {
for (bool with_delay : { true, false }) {
auto factory = std::make_unique<cfactory>();
rpc::server_options so;
rpc::client_options co;
Expand All @@ -349,6 +350,7 @@ SEASTAR_TEST_CASE(test_rpc_connect) {
co.compressor_factory = factory.get();
}
co.send_timeout_data = j & 2;
co.send_handler_duration = with_delay;
rpc_test_config cfg;
cfg.server_options = so;
auto f = rpc_test_env<>::do_with_thread(cfg, co, [] (rpc_test_env<>& env, test_rpc_proto::client& c1) {
Expand All @@ -368,6 +370,7 @@ SEASTAR_TEST_CASE(test_rpc_connect) {
}
});
fs.emplace_back(std::move(f));
}
}
}
return when_all(fs.begin(), fs.end()).discard_result();
Expand Down

0 comments on commit 595ae18

Please sign in to comment.