From a045551c70df031afe42d65abeb7d0c8dd26acea Mon Sep 17 00:00:00 2001 From: Marcin Siodelski Date: Tue, 13 Oct 2015 21:59:12 +0200 Subject: [PATCH] [4075] Added comment in the unit test about the usleep time selection. --- src/lib/dhcpsrv/tests/alloc_engine_expiration_unittest.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/dhcpsrv/tests/alloc_engine_expiration_unittest.cc b/src/lib/dhcpsrv/tests/alloc_engine_expiration_unittest.cc index 1472b3c4ac..f955109350 100644 --- a/src/lib/dhcpsrv/tests/alloc_engine_expiration_unittest.cc +++ b/src/lib/dhcpsrv/tests/alloc_engine_expiration_unittest.cc @@ -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) { -- 2.47.2