summaryrefslogtreecommitdiffstats
path: root/messagebus/src/tests/sourcesession
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 /messagebus/src/tests/sourcesession
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 'messagebus/src/tests/sourcesession')
-rw-r--r--messagebus/src/tests/sourcesession/sourcesession.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/messagebus/src/tests/sourcesession/sourcesession.cpp b/messagebus/src/tests/sourcesession/sourcesession.cpp
index 5177cf0e799..de04715a060 100644
--- a/messagebus/src/tests/sourcesession/sourcesession.cpp
+++ b/messagebus/src/tests/sourcesession/sourcesession.cpp
@@ -35,7 +35,7 @@ struct DelayedHandler : public IMessageHandler
// this will block the transport thread in the server messagebus,
// but that should be ok, as we only want to test the timing in the
// client messagebus...
- FastOS_Thread::Sleep(delay);
+ std::this_thread::sleep_for(std::chrono::milliseconds(delay));
session->acknowledge(std::move(msg));
}
};
@@ -59,7 +59,7 @@ bool waitQueueSize(RoutableQueue &queue, uint32_t size) {
if (queue.size() == size) {
return true;
}
- FastOS_Thread::Sleep(1);
+ std::this_thread::sleep_for(1ms);
}
return false;
}
@@ -99,7 +99,7 @@ Test::testSequencing()
EXPECT_TRUE(ss->send(Message::UP(new SimpleMessage("foo", true, 2)), "dst").isAccepted());
EXPECT_TRUE(ss->send(Message::UP(new SimpleMessage("foo", true, 1)), "dst").isAccepted());
EXPECT_TRUE(waitQueueSize(dstQ, 2));
- FastOS_Thread::Sleep(250);
+ std::this_thread::sleep_for(250ms);
EXPECT_TRUE(waitQueueSize(dstQ, 2));
EXPECT_TRUE(waitQueueSize(srcQ, 0));
ds->acknowledge(Message::UP((Message*)dstQ.dequeue(0).release()));