From c6b3ce6d16f92b80db77487900fb57a7a67b3203 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Thu, 27 Jun 2013 14:15:37 +0200 Subject: [PATCH] [2995] Dhcpv4Srv tests are now passing again. --- src/bin/dhcp4/tests/dhcp4_srv_unittest.cc | 9 +++++++++ src/bin/dhcp6/tests/dhcp6_srv_unittest.cc | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc b/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc index c39c56a69c..0785757a60 100644 --- a/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc +++ b/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -155,6 +156,14 @@ public: unlink(SRVID_FILE); } + virtual ~Dhcpv4SrvTest() { + + // Remove all registered hook points (it must be done even for tests that + // do not use hooks as the base class - Dhcpv4Srv calls allocation engine + // that registers hooks) + isc::hooks::ServerHooks::getServerHooks().reset(); + } + /// @brief Add 'Parameter Request List' option to the packet. /// /// This function PRL option comprising the following option codes: diff --git a/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc b/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc index 277b7497f5..b40122d176 100644 --- a/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc +++ b/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc @@ -111,7 +111,7 @@ public: virtual ~NakedDhcpv6Srv() { // Remove all registered hook points (it must be done even for tests that - // do not use hooks as the base class - Dhcpv6Srv registers hooks + // do not use hooks as the base class - Dhcpv6Srv registers hooks) ServerHooks::getServerHooks().reset(); // Close the lease database