From: Razvan Becheriu Date: Thu, 7 Apr 2022 20:15:33 +0000 (+0300) Subject: [#1716] fixed unittests for bsd X-Git-Tag: Kea-2.1.5~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42d2963f0190741f57772245db6290a42cfd8970;p=thirdparty%2Fkea.git [#1716] fixed unittests for bsd --- diff --git a/src/lib/dhcp/tests/iface_mgr_unittest.cc b/src/lib/dhcp/tests/iface_mgr_unittest.cc index 535a746673..a126169eb2 100644 --- a/src/lib/dhcp/tests/iface_mgr_unittest.cc +++ b/src/lib/dhcp/tests/iface_mgr_unittest.cc @@ -2499,7 +2499,7 @@ TEST_F(IfaceMgrTest, openSockets6SkipOpen) { // and bind to this address and port should fail. ASSERT_NO_THROW(ifacemgr.openSocket("eth0", IOAddress("fe80::3a60:77ff:fed5:cdef"), - DHCP6_SERVER_PORT, true)); + DHCP6_SERVER_PORT, false)); // The function doesn't throw an exception when it tries to open a socket // and bind it to the address in use but the skip open flag is provided. diff --git a/src/lib/dhcpsrv/tests/cfg_iface_unittest.cc b/src/lib/dhcpsrv/tests/cfg_iface_unittest.cc index a9a9260dd9..a15d8f1ff7 100644 --- a/src/lib/dhcpsrv/tests/cfg_iface_unittest.cc +++ b/src/lib/dhcpsrv/tests/cfg_iface_unittest.cc @@ -638,8 +638,7 @@ TEST_F(CfgIfaceTest, retryOpenServiceSockets4) { // Set the callback to count calls and check wait time size_t total_calls = 0; auto last_call_time = std::chrono::system_clock::time_point::min(); - auto open_callback = [&total_calls, &last_call_time, RETRIES, WAIT_TIME, - CALLS_PER_RETRY](uint16_t) { + auto open_callback = [&total_calls, &last_call_time, WAIT_TIME, CALLS_PER_RETRY](uint16_t) { auto now = std::chrono::system_clock::now(); // Check waiting time only for the first call in a retry attempt. @@ -837,8 +836,7 @@ TEST_F(CfgIfaceTest, retryOpenServiceSockets6) { // Set the callback to count calls and check wait time size_t total_calls = 0; auto last_call_time = std::chrono::system_clock::time_point::min(); - auto open_callback = [&total_calls, &last_call_time, RETRIES, WAIT_TIME, - CALLS_PER_RETRY](uint16_t) { + auto open_callback = [&total_calls, &last_call_time, WAIT_TIME, CALLS_PER_RETRY](uint16_t) { auto now = std::chrono::system_clock::now(); // Check waiting time only for the first call in a retry attempt.