diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-08-18 15:34:14 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-08-18 15:34:14 +0200 |
commit | ed2c63f77550376ffcd062b429d0b180adfc8135 (patch) | |
tree | 3437d6a3383db43b7f58fabdafce77b04273f924 | |
parent | 2e5456028b6a489cbcd2b07641bb2d171469cf73 (diff) |
Use std::this_thread::sleep_for instead of FastOS_Thread::Sleep
-rw-r--r-- | searchcore/src/tests/proton/attribute/attributeflush_test.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/searchcore/src/tests/proton/attribute/attributeflush_test.cpp b/searchcore/src/tests/proton/attribute/attributeflush_test.cpp index a37306a3d60..ecb39af61bc 100644 --- a/searchcore/src/tests/proton/attribute/attributeflush_test.cpp +++ b/searchcore/src/tests/proton/attribute/attributeflush_test.cpp @@ -30,6 +30,7 @@ typedef search::attribute::BasicType AVBasicType; typedef search::attribute::CollectionType AVCollectionType; using searchcorespi::IFlushTarget; using searchcorespi::FlushStats; +using namespace std::literals; typedef std::shared_ptr<Gate> GateSP; @@ -165,7 +166,7 @@ UpdaterTask::run() slowedDown = false; } if (needFlushToken > flushedToken + slowdownUpdateLim) { - FastOS_Thread::Sleep(100); + std::this_thread::sleep_for(100ms); if (!slowedDown) { LOG(warning, "Slowing down updates due to slow flushing (slow disk ?)"); @@ -511,7 +512,7 @@ Test::requireThatLastFlushTimeIsReported() IFlushTarget::SP ft = am.getFlushable("a9"); EXPECT_EQUAL(stat._modifiedTime, ft->getLastFlushTime().time()); { // updated flush time after nothing to flush - FastOS_Thread::Sleep(8000); + std::this_thread::sleep_for(8000ms); fastos::TimeStamp now = fastos::ClockSystem::now(); Executor::Task::UP task = ft->initFlush(200); EXPECT_TRUE(task.get() == NULL); |