]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3973] Added todos for the lease reclamation routines.
authorMarcin Siodelski <marcin@isc.org>
Fri, 11 Sep 2015 07:34:37 +0000 (09:34 +0200)
committerMarcin Siodelski <marcin@isc.org>
Fri, 11 Sep 2015 07:43:46 +0000 (09:43 +0200)
src/lib/dhcpsrv/alloc_engine.cc
src/lib/dhcpsrv/tests/alloc_engine_expiration_unittest.cc

index af97beb83fc6636f43050e117cde9c727bb73e57..35cf3c49be86301d9ca5bf609f6912034d41853f 100644 (file)
@@ -1291,6 +1291,8 @@ AllocEngine::reclaimExpiredLeases6(const size_t max_leases, const uint16_t timeo
 
     // Create stopwatch and automatically start it to measure the time
     // taken by the routine.
+    /// @todo Monitor time elapsed and return from the lease reclamation routine
+    /// if it hits the timeout value.
     util::Stopwatch stopwatch;
 
     LeaseMgr& lease_mgr = LeaseMgrFactory::instance();
@@ -1371,6 +1373,8 @@ AllocEngine::reclaimExpiredLeases4(const size_t max_leases, const uint16_t timeo
 
     // Create stopwatch and automatically start it to measure the time
     // taken by the routine.
+    /// @todo Monitor time elapsed and return from the lease reclamation routine
+    /// if it hits the timeout value.
     util::Stopwatch stopwatch;
 
     LeaseMgr& lease_mgr = LeaseMgrFactory::instance();
index 819e8fcfbe2b8cededcbf3a2897defdc0b55c633..3347553d0037ae50a9ab2382969051ba1f7a51aa 100644 (file)
@@ -146,6 +146,16 @@ struct UpperBound {
 /// "expired-reclaimed".
 ///
 /// See @c ExpirationAllocEngineTest::testLeases for further details.
+///
+/// @todo These tests should be extended to cover the following cases:
+/// - timeout value in the lease reclamation routines - the most reliable
+///   way to test it will be by attaching a lease4_expire/lease6_expire
+///   hooks which would block for a specific period of time. This will
+///   allow for calculating the approximate number of reclaimed leases
+///   within a given timeout. See ticket #3972.
+/// - declined leases - declined leases expire and should be removed
+///   from the lease database by the lease reclamation routine. See
+///   ticket #3976.
 template<typename LeasePtrType>
 class ExpirationAllocEngineTest : public ::testing::Test {
 public: