summaryrefslogtreecommitdiffstats
path: root/messagebus_test
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-11-19 14:06:57 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2019-11-20 10:16:58 +0000
commit86a245e6d0751dec7e38d64c4ea21ea7f4308239 (patch)
tree108cb5b7a96f96a0db35e95b13bf08e7dadad4d4 /messagebus_test
parent496e5cf57060fb068a9dc73ac7ff44333a60774e (diff)
Use timeouts typed with unit.
Diffstat (limited to 'messagebus_test')
-rw-r--r--messagebus_test/src/tests/error/cpp-client.cpp3
-rw-r--r--messagebus_test/src/tests/speed/cpp-client.cpp3
2 files changed, 4 insertions, 2 deletions
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 <vespa/fastos/app.h>
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 <vespa/fastos/app.h>
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<SimpleProtocol>()),
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);