From: Radoslaw Zarzynski Date: Mon, 1 Mar 2021 15:12:28 +0000 (+0000) Subject: crimson/tests: drop the v1 support in unittest-seastar-messenger. X-Git-Tag: v17.1.0~2794^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b31279468698ae7b2ba15461bfe1954308400144;p=ceph.git crimson/tests: drop the v1 support in unittest-seastar-messenger. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/test/crimson/test_messenger.cc b/src/test/crimson/test_messenger.cc index 3877ec570bb5e..19f37df2c3ec1 100644 --- a/src/test/crimson/test_messenger.cc +++ b/src/test/crimson/test_messenger.cc @@ -49,8 +49,7 @@ static entity_addr_t get_server_addr() { } static seastar::future<> test_echo(unsigned rounds, - double keepalive_ratio, - bool v2) + double keepalive_ratio) { struct test_state { struct Server final @@ -220,8 +219,8 @@ static seastar::future<> test_echo(unsigned rounds, }; }; - logger().info("test_echo(rounds={}, keepalive_ratio={}, v2={}):", - rounds, keepalive_ratio, v2); + logger().info("test_echo(rounds={}, keepalive_ratio={}):", + rounds, keepalive_ratio); auto server1 = seastar::make_shared(); auto server2 = seastar::make_shared(); auto client1 = seastar::make_shared(rounds, keepalive_ratio); @@ -229,13 +228,8 @@ static seastar::future<> test_echo(unsigned rounds, // start servers and clients auto addr1 = get_server_addr(); auto addr2 = get_server_addr(); - if (v2) { - addr1.set_type(entity_addr_t::TYPE_MSGR2); - addr2.set_type(entity_addr_t::TYPE_MSGR2); - } else { - addr1.set_type(entity_addr_t::TYPE_LEGACY); - addr2.set_type(entity_addr_t::TYPE_LEGACY); - } + addr1.set_type(entity_addr_t::TYPE_MSGR2); + addr2.set_type(entity_addr_t::TYPE_MSGR2); return seastar::when_all_succeed( server1->init(entity_name_t::OSD(0), "server1", 1, addr1), server2->init(entity_name_t::OSD(1), "server2", 2, addr2), @@ -270,7 +264,7 @@ static seastar::future<> test_echo(unsigned rounds, }); } -static seastar::future<> test_concurrent_dispatch(bool v2) +static seastar::future<> test_concurrent_dispatch() { struct test_state { struct Server final @@ -340,15 +334,11 @@ static seastar::future<> test_concurrent_dispatch(bool v2) }; }; - logger().info("test_concurrent_dispatch(v2={}):", v2); + logger().info("test_concurrent_dispatch():"); auto server = seastar::make_shared(); auto client = seastar::make_shared(); auto addr = get_server_addr(); - if (v2) { - addr.set_type(entity_addr_t::TYPE_MSGR2); - } else { - addr.set_type(entity_addr_t::TYPE_LEGACY); - } + addr.set_type(entity_addr_t::TYPE_MSGR2); addr.set_family(AF_INET); return seastar::when_all_succeed( server->init(entity_name_t::OSD(4), "server3", 5, addr), @@ -378,7 +368,7 @@ static seastar::future<> test_concurrent_dispatch(bool v2) }); } -seastar::future<> test_preemptive_shutdown(bool v2) { +seastar::future<> test_preemptive_shutdown() { struct test_state { class Server final : public crimson::net::Dispatcher { @@ -465,15 +455,11 @@ seastar::future<> test_preemptive_shutdown(bool v2) { }; }; - logger().info("test_preemptive_shutdown(v2={}):", v2); + logger().info("test_preemptive_shutdown():"); auto server = seastar::make_shared(); auto client = seastar::make_shared(); auto addr = get_server_addr(); - if (v2) { - addr.set_type(entity_addr_t::TYPE_MSGR2); - } else { - addr.set_type(entity_addr_t::TYPE_LEGACY); - } + addr.set_type(entity_addr_t::TYPE_MSGR2); addr.set_family(AF_INET); return seastar::when_all_succeed( server->init(entity_name_t::OSD(6), "server4", 7, addr), @@ -3608,17 +3594,11 @@ seastar::future do_test(seastar::app_template& app) ceph_assert(v2_testpeer_addr.parse( config["v2-testpeer-addr"].as().c_str(), nullptr)); auto v2_testpeer_islocal = config["v2-testpeer-islocal"].as(); - return test_echo(rounds, keepalive_ratio, false) - .then([rounds, keepalive_ratio] { - return test_echo(rounds, keepalive_ratio, true); - }).then([] { - return test_concurrent_dispatch(false); - }).then([] { - return test_concurrent_dispatch(true); - }).then([] { - return test_preemptive_shutdown(false); + return test_echo(rounds, keepalive_ratio) + .then([] { + return test_concurrent_dispatch(); }).then([] { - return test_preemptive_shutdown(true); + return test_preemptive_shutdown(); }).then([v2_test_addr, v2_testpeer_addr, v2_testpeer_islocal] { return test_v2_protocol(v2_test_addr, v2_testpeer_addr, v2_testpeer_islocal); }).then([] {