Skip to content

Commit 7dd4146

Browse files
author
Razvan Becheriu
committed
[#3602] Add test failure on exception thrown
1 parent 7f08d90 commit 7dd4146

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/bin/dhcp4/tests/http_control_socket_unittest.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,11 @@ class BaseCtrlChannelDhcpv4Test : public ::testing::Test {
150150
TEST_TIMEOUT, IntervalTimer::ONE_SHOT);
151151
// Run until the client stops the service or an error occurs.
152152
try {
153-
io_service->run();
153+
io_service->run();
154+
} catch (const std::exception& ex) {
155+
ADD_FAILURE() << "Exception thrown while running test. Error: " << ex.what();
154156
} catch (...) {
157+
ADD_FAILURE() << "Unknown exception thrown while running test.";
155158
}
156159
test_timer.cancel();
157160
if (io_service->stopped()) {

src/bin/dhcp6/tests/http_control_socket_unittest.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,11 @@ class BaseCtrlChannelDhcpv6Test : public HttpCtrlDhcpv6Test {
188188
TEST_TIMEOUT, IntervalTimer::ONE_SHOT);
189189
// Run until the client stops the service or an error occurs.
190190
try {
191-
io_service->run();
191+
io_service->run();
192+
} catch (const std::exception& ex) {
193+
ADD_FAILURE() << "Exception thrown while running test. Error: " << ex.what();
192194
} catch (...) {
195+
ADD_FAILURE() << "Unknown exception thrown while running test.";
193196
}
194197
test_timer.cancel();
195198
if (io_service->stopped()) {

src/lib/http/connection_pool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class HttpConnectionPool {
7171
std::mutex mutex_;
7272
};
7373

74-
/// @brief Pointer to the @ref HttpConnection.
74+
/// @brief Pointer to the @ref HttpConnectionPool.
7575
typedef std::shared_ptr<HttpConnectionPool> HttpConnectionPoolPtr;
7676

7777
}

0 commit comments

Comments
 (0)