aboutsummaryrefslogtreecommitdiffstats
path: root/messagebus/src/tests/routing
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-10-04 22:05:19 +0200
committerHenning Baldersheim <balder@oath.com>2018-10-04 22:05:19 +0200
commit0bdd3c5fa4326ed4106b9aee0585d57c7193bd97 (patch)
tree2b519cf259eb30ab28d85fc560a589457f54ed17 /messagebus/src/tests/routing
parent3f2b1a9230fbab12f2e8b5afcf1e0ad72f3d872a (diff)
Remove the costly and unnecessary setSlobrokId interface.
Diffstat (limited to 'messagebus/src/tests/routing')
-rw-r--r--messagebus/src/tests/routing/routing.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/messagebus/src/tests/routing/routing.cpp b/messagebus/src/tests/routing/routing.cpp
index 515cbd99fde..cb9ad2eef47 100644
--- a/messagebus/src/tests/routing/routing.cpp
+++ b/messagebus/src/tests/routing/routing.cpp
@@ -546,26 +546,24 @@ TEST_APPHOOK(Test);
TestData::TestData() :
_slobrok(),
- _retryPolicy(new RetryTransientErrorsPolicy()),
+ _retryPolicy(std::make_shared<RetryTransientErrorsPolicy>()),
_srcServer(MessageBusParams()
.setRetryPolicy(_retryPolicy)
- .addProtocol(IProtocol::SP(new SimpleProtocol())),
- RPCNetworkParams()
- .setSlobrokConfig(_slobrok.config())),
+ .addProtocol(std::make_shared<SimpleProtocol>()),
+ RPCNetworkParams(_slobrok.config())),
_srcSession(),
_srcHandler(),
_dstServer(MessageBusParams()
- .addProtocol(IProtocol::SP(new SimpleProtocol())),
- RPCNetworkParams()
- .setIdentity(Identity("dst"))
- .setSlobrokConfig(_slobrok.config())),
+ .addProtocol(std::make_shared<SimpleProtocol>()),
+ RPCNetworkParams(_slobrok.config())
+ .setIdentity(Identity("dst"))),
_dstSession(),
_dstHandler()
{
_retryPolicy->setBaseDelay(0);
}
-TestData::~TestData() {}
+TestData::~TestData() = default;
bool
TestData::start()
@@ -573,13 +571,13 @@ TestData::start()
_srcSession = _srcServer.mb.createSourceSession(SourceSessionParams()
.setThrottlePolicy(IThrottlePolicy::SP())
.setReplyHandler(_srcHandler));
- if (_srcSession.get() == NULL) {
+ if ( ! _srcSession) {
return false;
}
_dstSession = _dstServer.mb.createDestinationSession(DestinationSessionParams()
.setName("session")
.setMessageHandler(_dstHandler));
- if (_dstSession.get() == NULL) {
+ if ( ! _dstSession) {
return false;
}
if (!_srcServer.waitSlobrok("dst/session", 1u)) {