@@ -13,6 +13,7 @@ namespace r = bredis;
1313namespace asio = boost::asio;
1414namespace sys = boost::system;
1515namespace ep = empty_port;
16+ namespace sys = boost::system;
1617
1718TEST_CASE (" protocol-error" , " [connection]" ) {
1819 using socket_t = asio::ip::tcp::socket;
@@ -53,17 +54,18 @@ TEST_CASE("protocol-error", "[connection]") {
5354 async_read_until (
5455 peer_socket, remote_rx_buff, end_marker,
5556 [&](const sys::error_code &ec, std::size_t sz) {
56- (void )ec;(void )sz;
57+ (void )ec;
58+ (void )sz;
5759 BREDIS_LOG_DEBUG (" async_read: " << sz << " , " << ec.message ());
5860
5961 async_write (peer_socket, output_buf,
6062 [&](const sys::error_code &ec, std::size_t sz) {
61- (void )ec;(void )sz;
63+ (void )ec;
64+ (void )sz;
6265 BREDIS_LOG_DEBUG (" async_write: "
6366 << sz << " , " << ec.message ());
6467 });
6568 });
66-
6769 });
6870
6971 socket_t socket (io_service, end_point.protocol ());
@@ -75,14 +77,16 @@ TEST_CASE("protocol-error", "[connection]") {
7577
7678 Buffer rx_buff, tx_buff;
7779 c.async_write (
78- tx_buff, " ping" , [&](const auto &error_code, auto bytes_transferred) {
79- REQUIRE (!error_code);
80+ tx_buff, " ping" ,
81+ [&](const sys::error_code &ec, std::size_t bytes_transferred) {
82+ REQUIRE (!ec);
8083 tx_buff.consume (bytes_transferred);
81- c.async_read (rx_buff, [&](const auto &error_code, ParseResult &&) {
82- REQUIRE (error_code);
83- REQUIRE (error_code.message () == " Wrong introduction" );
84- completion_promise.set_value ();
85- });
84+ c.async_read (rx_buff,
85+ [&](const sys::error_code &ec, ParseResult &&) {
86+ REQUIRE (ec);
87+ REQUIRE (ec.message () == " Wrong introduction" );
88+ completion_promise.set_value ();
89+ });
8690 });
8791 while (completion_future.wait_for (sleep_delay) !=
8892 std::future_status::ready) {
0 commit comments