From: Marcin Siodelski Date: Wed, 16 May 2018 14:42:15 +0000 (+0200) Subject: [master] Fixed race in the Observation test. X-Git-Tag: trac5549a_base~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=770dc7bd8011cda8fc323ce7ad7a9e666e5c0d6d;p=thirdparty%2Fkea.git [master] Fixed race in the Observation test. Okayed on jabber. --- diff --git a/src/lib/stats/tests/observation_unittest.cc b/src/lib/stats/tests/observation_unittest.cc index d39173bc09..ea3c757d36 100644 --- a/src/lib/stats/tests/observation_unittest.cc +++ b/src/lib/stats/tests/observation_unittest.cc @@ -139,9 +139,9 @@ TEST_F(ObservationTest, timers) { ptime before = microsec_clock::local_time(); b.setValue(123.0); // Set it to a random value and record the time. - // Allow a bit of imprecision. This test allows 50ms. That should be ok, + // Allow a bit of imprecision. This test allows 500ms. That should be ok, // when running on virtual machines. - ptime after = before + millisec::time_duration(0,0,0,50); + ptime after = before + milliseconds(500); // Now wait some time. We want to confirm that the timestamp recorded is the // time the observation took place, not current time.