]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[4075] Added comment in the unit test about the usleep time selection.
authorMarcin Siodelski <marcin@isc.org>
Tue, 13 Oct 2015 19:59:12 +0000 (21:59 +0200)
committerMarcin Siodelski <marcin@isc.org>
Tue, 13 Oct 2015 19:59:12 +0000 (21:59 +0200)
src/lib/dhcpsrv/tests/alloc_engine_expiration_unittest.cc

index 1472b3c4ac28b7d6fdeaa0bcc258f884a73fc25e..f955109350f0662c0d43545ba4cf51b7b7257ffd 100644 (file)
@@ -511,6 +511,12 @@ public:
     /// the approximate time that the reclamation of all leases would take and
     /// test that the timeouts for the leases' reclamation work as expected.
     ///
+    /// The value of 40ms is relatively high, but it has been selected to
+    /// mitigate the problems with usleep on some virtual machines. On those
+    /// machines the wakeup from usleep may take significant amount of time,
+    /// i.e. usually around 10ms. Thus, the sleep time should be considerably
+    /// higher than this delay.
+    ///
     /// @param callout_handle Callout handle.
     /// @return Zero.
     static int leaseExpireWithDelayCallout(CalloutHandle& callout_handle) {