From 86a245e6d0751dec7e38d64c4ea21ea7f4308239 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Tue, 19 Nov 2019 14:06:57 +0000 Subject: Use timeouts typed with unit. --- messagebus_test/src/tests/error/cpp-client.cpp | 3 ++- messagebus_test/src/tests/speed/cpp-client.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'messagebus_test/src/tests') diff --git a/messagebus_test/src/tests/error/cpp-client.cpp b/messagebus_test/src/tests/error/cpp-client.cpp index 2a3376336ea..f186be68d01 100644 --- a/messagebus_test/src/tests/error/cpp-client.cpp +++ b/messagebus_test/src/tests/error/cpp-client.cpp @@ -10,6 +10,7 @@ #include using namespace mbus; +using namespace std::chrono_literals; class App : public FastOS_Application { @@ -29,7 +30,7 @@ App::Main() Message::UP msg; Reply::UP reply; - SourceSession::UP ss = mb.getMessageBus().createSourceSession(src, SourceSessionParams().setTimeout(300)); + SourceSession::UP ss = mb.getMessageBus().createSourceSession(src, SourceSessionParams().setTimeout(300s)); for (int i = 0; i < 10; ++i) { msg.reset(new SimpleMessage("test")); msg->getTrace().setLevel(9); diff --git a/messagebus_test/src/tests/speed/cpp-client.cpp b/messagebus_test/src/tests/speed/cpp-client.cpp index 299b2a01948..59ca47514c9 100644 --- a/messagebus_test/src/tests/speed/cpp-client.cpp +++ b/messagebus_test/src/tests/speed/cpp-client.cpp @@ -10,6 +10,7 @@ #include using namespace mbus; +using namespace std::chrono_literals; class Client : public IReplyHandler { @@ -95,7 +96,7 @@ App::Main() RPCMessageBus mb(MessageBusParams().setRetryPolicy(retryPolicy).addProtocol(std::make_shared()), RPCNetworkParams("file:slobrok.cfg").setIdentity(Identity("server/cpp")), "file:routing.cfg"); - Client client(mb.getMessageBus(), SourceSessionParams().setTimeout(30)); + Client client(mb.getMessageBus(), SourceSessionParams().setTimeout(30s)); // let the system 'warm up' FastOS_Thread::Sleep(5000); -- cgit v1.2.3