Skip to content

Commit 8fd3034

Browse files
committed
Fixing the test to force the explicit conversion of the body, to get the according exception.
1 parent c565cec commit 8fd3034

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

libs/network/test/http/client_get_timeout_test.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,21 @@ namespace http = boost::network::http;
1414
BOOST_AUTO_TEST_CASE_TEMPLATE(http_get_test_timeout_1_0, T, tag_types) {
1515
typedef http::basic_client<T, 1, 0> client;
1616
typename client::request request("http://localhost:12121/");
17-
client client_;
1817
typename client::response response_;
18+
client client_;
1919
boost::uint16_t port_ = port(request);
20+
typename client::response::string_type temp;
2021
BOOST_CHECK_EQUAL ( 12121, port_ );
21-
BOOST_CHECK_THROW ( response_ = client_.get(request); body(response_); , std::exception );
22+
BOOST_CHECK_THROW ( response_ = client_.get(request); temp = body(response_); , std::exception );
2223
}
2324

2425
BOOST_AUTO_TEST_CASE_TEMPLATE(http_get_test_timeout_1_1, T, tag_types) {
2526
typedef http::basic_client<T, 1, 1> client_type;
2627
typename client_type::request request("http://localhost:12121/");
2728
typename client_type::response response_;
2829
boost::uint16_t port_ = port(request);
30+
typename client_type::response::string_type temp;
2931
BOOST_CHECK_EQUAL ( 12121, port_ );
3032
client_type client_;
31-
BOOST_CHECK_THROW ( response_ = client_.get(request); body(response_); , std::exception );
33+
BOOST_CHECK_THROW ( response_ = client_.get(request); temp = body(response_); , std::exception );
3234
}

0 commit comments

Comments
 (0)