diff options
Diffstat (limited to 'src/lib/dhcpsrv/tests')
-rw-r--r-- | src/lib/dhcpsrv/tests/cfg_expiration_unittest.cc | 2 | ||||
-rw-r--r-- | src/lib/dhcpsrv/tests/cfg_iface_unittest.cc | 2 | ||||
-rw-r--r-- | src/lib/dhcpsrv/tests/d2_udp_unittest.cc | 12 | ||||
-rw-r--r-- | src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc | 6 | ||||
-rw-r--r-- | src/lib/dhcpsrv/tests/timer_mgr_unittest.cc | 2 |
5 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/dhcpsrv/tests/cfg_expiration_unittest.cc b/src/lib/dhcpsrv/tests/cfg_expiration_unittest.cc index ee5b3a76d8..067a697809 100644 --- a/src/lib/dhcpsrv/tests/cfg_expiration_unittest.cc +++ b/src/lib/dhcpsrv/tests/cfg_expiration_unittest.cc @@ -322,7 +322,7 @@ public: /// /// @param timeout_ms Amount of time after which the method returns. void runTimersWithTimeout(const long timeout_ms) { - IntervalTimer timer(*io_service_); + IntervalTimer timer(io_service_); timer.setup([this]() { io_service_->stop(); }, timeout_ms, IntervalTimer::ONE_SHOT); diff --git a/src/lib/dhcpsrv/tests/cfg_iface_unittest.cc b/src/lib/dhcpsrv/tests/cfg_iface_unittest.cc index 5b10f964e3..b02d7841f4 100644 --- a/src/lib/dhcpsrv/tests/cfg_iface_unittest.cc +++ b/src/lib/dhcpsrv/tests/cfg_iface_unittest.cc @@ -117,7 +117,7 @@ CfgIfaceTest::unicastOpen(const std::string& iface_name) const { void CfgIfaceTest::doWait(const long timeout) { - asiolink::IntervalTimer timer(*io_service_); + asiolink::IntervalTimer timer(io_service_); timer.setup([this]() { io_service_->stop(); }, timeout, asiolink::IntervalTimer::ONE_SHOT); diff --git a/src/lib/dhcpsrv/tests/d2_udp_unittest.cc b/src/lib/dhcpsrv/tests/d2_udp_unittest.cc index 106e7bc4d3..777f070ad8 100644 --- a/src/lib/dhcpsrv/tests/d2_udp_unittest.cc +++ b/src/lib/dhcpsrv/tests/d2_udp_unittest.cc @@ -21,6 +21,7 @@ #include <sys/select.h> using namespace std; +using namespace isc::asiolink; using namespace isc::dhcp; using namespace isc; namespace ph = std::placeholders; @@ -65,10 +66,9 @@ public: // Update the configuration with one that is enabled. D2ClientConfigPtr new_cfg; - isc::asiolink::IOAddress server_ip(server_address); - isc::asiolink::IOAddress sender_ip(server_ip.isV4() ? - D2ClientConfig::DFT_V4_SENDER_IP : - D2ClientConfig::DFT_V6_SENDER_IP); + IOAddress server_ip(server_address); + IOAddress sender_ip(server_ip.isV4() ? D2ClientConfig::DFT_V4_SENDER_IP : + D2ClientConfig::DFT_V6_SENDER_IP); ASSERT_NO_THROW(new_cfg.reset(new D2ClientConfig(true, server_ip, server_port, @@ -296,7 +296,7 @@ TEST_F(D2ClientMgrTest, udpSendExternalIOService) { enableDdns("127.0.0.1", 53001, dhcp_ddns::NCR_UDP); // Place sender in send mode using an external IO service. - asiolink::IOService io_service; + asiolink::IOServicePtr io_service(new IOService()); ASSERT_NO_THROW(startSender(getErrorHandler(), io_service)); // select_fd should evaluate to NOT ready to read. @@ -328,7 +328,7 @@ TEST_F(D2ClientMgrTest, udpSendExternalIOService6) { enableDdns("::1", 53001, dhcp_ddns::NCR_UDP); // Place sender in send mode using an external IO service. - asiolink::IOService io_service; + asiolink::IOServicePtr io_service(new IOService()); ASSERT_NO_THROW(startSender(getErrorHandler(), io_service)); // select_fd should evaluate to NOT ready to read. diff --git a/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc b/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc index e9e7a2b72d..bca014b60e 100644 --- a/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc +++ b/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc @@ -242,7 +242,7 @@ public: /// /// @param ms Duration in milliseconds. void setTestTime(const uint32_t ms) { - IntervalTimer timer(*io_service_); + IntervalTimer timer(io_service_); timer.setup([this]() { io_service_->stop(); }, ms, IntervalTimer::ONE_SHOT); @@ -260,8 +260,8 @@ public: bool waitForProcess(const Memfile_LeaseMgr& lease_mgr, const uint8_t timeout) { const uint32_t iterations_max = timeout * 1000; - IntervalTimer fast_path_timer(*io_service_); - IntervalTimer timer(*io_service_); + IntervalTimer fast_path_timer(io_service_); + IntervalTimer timer(io_service_); bool elapsed = false; timer.setup([&]() { io_service_->stop(); diff --git a/src/lib/dhcpsrv/tests/timer_mgr_unittest.cc b/src/lib/dhcpsrv/tests/timer_mgr_unittest.cc index 9dd1845d33..e76474a54d 100644 --- a/src/lib/dhcpsrv/tests/timer_mgr_unittest.cc +++ b/src/lib/dhcpsrv/tests/timer_mgr_unittest.cc @@ -165,7 +165,7 @@ TimerMgrTest::registerTimer(const std::string& timer_name, const long timer_inte void TimerMgrTest::doWait(const long timeout, const bool /*call_receive*/) { - IntervalTimer timer(*io_service_); + IntervalTimer timer(io_service_); timer.setup([this]() { io_service_->stop(); }, timeout, IntervalTimer::ONE_SHOT); |