summaryrefslogtreecommitdiffstats
path: root/config/src/tests/configholder/configholder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'config/src/tests/configholder/configholder.cpp')
-rw-r--r--config/src/tests/configholder/configholder.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/config/src/tests/configholder/configholder.cpp b/config/src/tests/configholder/configholder.cpp
index a9b6dafb72a..a488cca705a 100644
--- a/config/src/tests/configholder/configholder.cpp
+++ b/config/src/tests/configholder/configholder.cpp
@@ -1,9 +1,9 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/config/common/configholder.h>
-#include <vespa/fastos/time.h>
using namespace config;
+using namespace std::chrono_literals;
namespace {
@@ -35,12 +35,12 @@ TEST("Require that waiting is done")
ConfigHolder holder;
FastOS_Time timer;
timer.SetNow();
- holder.wait(1000);
+ holder.wait(1000ms);
EXPECT_GREATER_EQUAL(timer.MilliSecsToNow(), ONE_SEC);
EXPECT_LESS(timer.MilliSecsToNow(), ONE_MINUTE);
holder.handle(std::make_unique<ConfigUpdate>(value, true, 0));
- ASSERT_TRUE(holder.wait(100));
+ ASSERT_TRUE(holder.wait(100ms));
}
TEST("Require that polling for elements work")
@@ -73,13 +73,13 @@ TEST_MT_F("Require that wait is interrupted", 2, ConfigHolder)
FastOS_Time timer;
timer.SetNow();
TEST_BARRIER();
- f.wait(1000);
+ f.wait(1000ms);
EXPECT_LESS(timer.MilliSecsToNow(), ONE_MINUTE);
EXPECT_GREATER(timer.MilliSecsToNow(), 400.0);
TEST_BARRIER();
} else {
TEST_BARRIER();
- std::this_thread::sleep_for(std::chrono::milliseconds(500));
+ std::this_thread::sleep_for(500ms);
f.interrupt();
TEST_BARRIER();
}