summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-12-03 14:24:41 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2019-12-04 18:15:16 +0000
commit8946dbea418f760e4f0a5cbe2eb2bcbcddd25032 (patch)
treefc254ea5dea29ddf6a395b8bcdcb8c7540d22238 /config
parent7700f411ea6f4a3e7c0599fae239ec84c18c0038 (diff)
FastOS_THread::Sleep -> std::chrono::sleep_for
Renamed Timer -> ScheduledExecutor. Do not include thread.h when not needed in header files.
Diffstat (limited to 'config')
-rw-r--r--config/src/tests/api/api.cpp2
-rw-r--r--config/src/tests/configfetcher/configfetcher.cpp2
-rw-r--r--config/src/tests/configretriever/configretriever.cpp2
-rw-r--r--config/src/tests/frt/frt.cpp4
4 files changed, 5 insertions, 5 deletions
diff --git a/config/src/tests/api/api.cpp b/config/src/tests/api/api.cpp
index 4db66761444..0af2b848ea5 100644
--- a/config/src/tests/api/api.cpp
+++ b/config/src/tests/api/api.cpp
@@ -32,7 +32,7 @@ TEST_MT_FFF("require that source may be unable to serve config temporarily", 2,
ASSERT_TRUE(cfg.get() != NULL);
ASSERT_EQUAL("myfoo", cfg->myField);
} else {
- FastOS_Thread::Sleep(1000);
+ std::this_thread::sleep_for(1s);
f3.myField = "myfoo";
f2.addBuilder("myid", &f3);
f1->reload();
diff --git a/config/src/tests/configfetcher/configfetcher.cpp b/config/src/tests/configfetcher/configfetcher.cpp
index 607ab0a29a5..be25e913980 100644
--- a/config/src/tests/configfetcher/configfetcher.cpp
+++ b/config/src/tests/configfetcher/configfetcher.cpp
@@ -69,7 +69,7 @@ TEST("requireThatConfigUpdatesArePerformed") {
while (!cb._configured && timer.elapsed().ms() < 20000.0) {
if (cb._configured)
break;
- FastOS_Thread::Sleep(1000);
+ std::this_thread::sleep_for(1s);
}
ASSERT_TRUE(cb._configured);
ASSERT_TRUE(cb._config);
diff --git a/config/src/tests/configretriever/configretriever.cpp b/config/src/tests/configretriever/configretriever.cpp
index fc921a324af..87f189ad7d3 100644
--- a/config/src/tests/configretriever/configretriever.cpp
+++ b/config/src/tests/configretriever/configretriever.cpp
@@ -251,7 +251,7 @@ public:
if (configured) {
return true;
}
- FastOS_Thread::Sleep(200);
+ std::this_thread::sleep_for(200ms);
}
return configured;
}
diff --git a/config/src/tests/frt/frt.cpp b/config/src/tests/frt/frt.cpp
index ba8279a1999..28dea82bfe7 100644
--- a/config/src/tests/frt/frt.cpp
+++ b/config/src/tests/frt/frt.cpp
@@ -49,7 +49,7 @@ namespace {
while (timer.elapsed().ms() < timeoutInMillis) {
if (notified)
break;
- FastOS_Thread::Sleep(100);
+ std::this_thread::sleep_for(100ms);
}
return notified;
}
@@ -260,7 +260,7 @@ TEST_FF("require that request is config task is scheduled", SourceFixture(), FRT
f1.conn.scheduler.CheckTasks();
if (f2.result.notified)
break;
- FastOS_Thread::Sleep(500);
+ std::this_thread::sleep_for(500ms);
}
ASSERT_TRUE(f2.result.notified);
f2.src.close();