]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Fixed race in the Observation test.
authorMarcin Siodelski <marcin@isc.org>
Wed, 16 May 2018 14:42:15 +0000 (16:42 +0200)
committerMarcin Siodelski <marcin@isc.org>
Wed, 16 May 2018 14:42:15 +0000 (16:42 +0200)
Okayed on jabber.

src/lib/stats/tests/observation_unittest.cc

index d39173bc0904c12daf10a99c298a5c7731cca8f1..ea3c757d36897065434b7cfa15666570154cc7d7 100644 (file)
@@ -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.