summaryrefslogtreecommitdiffstats
path: root/messagebus
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-04-05 20:59:01 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-04-23 13:31:24 +0200
commit40bddbaac34ece542a057aa97eb63db6f1c5775e (patch)
tree5de3547eee329ed1b064722a697d2cda9eb53476 /messagebus
parentb57308e4a134fb6139d2cb52a031d3e7185f16cf (diff)
Including storage now builds fine with override enforcement.
Diffstat (limited to 'messagebus')
-rw-r--r--messagebus/src/tests/context/context.cpp2
-rw-r--r--messagebus/src/tests/loadbalance/loadbalance.cpp2
-rw-r--r--messagebus/src/tests/messageordering/messageordering.cpp4
-rw-r--r--messagebus/src/tests/messenger/messenger.cpp3
-rw-r--r--messagebus/src/tests/oos/oos.cpp5
-rw-r--r--messagebus/src/tests/protocolrepository/protocolrepository.cpp3
-rw-r--r--messagebus/src/tests/replygate/replygate.cpp5
-rw-r--r--messagebus/src/tests/resender/resender.cpp3
-rw-r--r--messagebus/src/tests/result/result.cpp4
-rw-r--r--messagebus/src/tests/routablequeue/routablequeue.cpp11
-rw-r--r--messagebus/src/tests/routeparser/routeparser.cpp6
-rw-r--r--messagebus/src/tests/routing/routing.cpp15
-rw-r--r--messagebus/src/tests/routingcontext/routingcontext.cpp3
-rw-r--r--messagebus/src/tests/sendadapter/sendadapter.cpp6
-rw-r--r--messagebus/src/tests/serviceaddress/serviceaddress.cpp17
-rw-r--r--messagebus/src/tests/servicepool/servicepool.cpp3
-rw-r--r--messagebus/src/tests/shutdown/shutdown.cpp3
-rw-r--r--messagebus/src/tests/sourcesession/sourcesession.cpp5
-rw-r--r--messagebus/src/tests/targetpool/targetpool.cpp3
-rw-r--r--messagebus/src/tests/throttling/throttling.cpp3
-rw-r--r--messagebus/src/tests/timeout/timeout.cpp4
-rw-r--r--messagebus/src/tests/trace-roundtrip/trace-roundtrip.cpp4
22 files changed, 33 insertions, 81 deletions
diff --git a/messagebus/src/tests/context/context.cpp b/messagebus/src/tests/context/context.cpp
index 5ad36df7c72..3ba19e8f858 100644
--- a/messagebus/src/tests/context/context.cpp
+++ b/messagebus/src/tests/context/context.cpp
@@ -27,7 +27,7 @@ struct Handler : public IMessageHandler
~Handler() {
session.reset();
}
- virtual void handleMessage(Message::UP msg) override {
+ void handleMessage(Message::UP msg) override {
session->acknowledge(std::move(msg));
}
};
diff --git a/messagebus/src/tests/loadbalance/loadbalance.cpp b/messagebus/src/tests/loadbalance/loadbalance.cpp
index 83ff4c042da..9e2a6e48d24 100644
--- a/messagebus/src/tests/loadbalance/loadbalance.cpp
+++ b/messagebus/src/tests/loadbalance/loadbalance.cpp
@@ -28,7 +28,7 @@ struct Handler : public IMessageHandler
~Handler() {
session.reset();
}
- virtual void handleMessage(Message::UP msg) override {
+ void handleMessage(Message::UP msg) override {
++cnt;
session->acknowledge(std::move(msg));
}
diff --git a/messagebus/src/tests/messageordering/messageordering.cpp b/messagebus/src/tests/messageordering/messageordering.cpp
index e80505b2e89..df6ca38dd0d 100644
--- a/messagebus/src/tests/messageordering/messageordering.cpp
+++ b/messagebus/src/tests/messageordering/messageordering.cpp
@@ -46,8 +46,8 @@ public:
_destinationSession(0),
_messageCounter(0)
{}
- virtual void handleMessage(Message::UP msg) override
- {
+ void handleMessage(Message::UP msg) override
+ {
SimpleMessage& simpleMsg(dynamic_cast<SimpleMessage&>(*msg));
LOG(spam, "Attempting to acquire lock for %s",
simpleMsg.getValue().c_str());
diff --git a/messagebus/src/tests/messenger/messenger.cpp b/messagebus/src/tests/messenger/messenger.cpp
index 5cf3625523f..7b2b75212ee 100644
--- a/messagebus/src/tests/messenger/messenger.cpp
+++ b/messagebus/src/tests/messenger/messenger.cpp
@@ -1,7 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("messagebus_test");
#include <vespa/messagebus/messenger.h>
#include <vespa/vespalib/util/barrier.h>
diff --git a/messagebus/src/tests/oos/oos.cpp b/messagebus/src/tests/oos/oos.cpp
index b19de4a94f8..dc224a1519c 100644
--- a/messagebus/src/tests/oos/oos.cpp
+++ b/messagebus/src/tests/oos/oos.cpp
@@ -1,7 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("oos_test");
#include <vespa/messagebus/destinationsession.h>
#include <vespa/messagebus/errorcode.h>
@@ -31,7 +28,7 @@ struct Handler : public IMessageHandler
~Handler() {
session.reset();
}
- virtual void handleMessage(Message::UP msg) override {
+ void handleMessage(Message::UP msg) override {
session->acknowledge(std::move(msg));
}
};
diff --git a/messagebus/src/tests/protocolrepository/protocolrepository.cpp b/messagebus/src/tests/protocolrepository/protocolrepository.cpp
index cf1d77bdc7e..f9c971336c5 100644
--- a/messagebus/src/tests/protocolrepository/protocolrepository.cpp
+++ b/messagebus/src/tests/protocolrepository/protocolrepository.cpp
@@ -1,7 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("protocolrepository_test");
#include <vespa/messagebus/protocolrepository.h>
#include <vespa/vespalib/testkit/testapp.h>
diff --git a/messagebus/src/tests/replygate/replygate.cpp b/messagebus/src/tests/replygate/replygate.cpp
index d190f278be4..8f784495866 100644
--- a/messagebus/src/tests/replygate/replygate.cpp
+++ b/messagebus/src/tests/replygate/replygate.cpp
@@ -1,7 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("replygate_test");
#include <vespa/messagebus/emptyreply.h>
#include <vespa/messagebus/imessagehandler.h>
@@ -44,7 +41,7 @@ struct MySender : public IMessageHandler
{
// giving a sync reply here is against the API contract, but it is
// ok for testing.
- virtual void handleMessage(Message::UP msg) override {
+ void handleMessage(Message::UP msg) override {
Reply::UP reply(new MyReply());
msg->swapState(*reply);
IReplyHandler &handler = reply->getCallStack().pop(*reply);
diff --git a/messagebus/src/tests/resender/resender.cpp b/messagebus/src/tests/resender/resender.cpp
index dad8ef73e68..701ce20737c 100644
--- a/messagebus/src/tests/resender/resender.cpp
+++ b/messagebus/src/tests/resender/resender.cpp
@@ -1,7 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("routing_test");
#include <vespa/messagebus/emptyreply.h>
#include <vespa/messagebus/errorcode.h>
diff --git a/messagebus/src/tests/result/result.cpp b/messagebus/src/tests/result/result.cpp
index a404135d64c..963e44d1dda 100644
--- a/messagebus/src/tests/result/result.cpp
+++ b/messagebus/src/tests/result/result.cpp
@@ -1,7 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("result_test");
+
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/messagebus/result.h>
#include <vespa/messagebus/error.h>
diff --git a/messagebus/src/tests/routablequeue/routablequeue.cpp b/messagebus/src/tests/routablequeue/routablequeue.cpp
index a6bd66bd5df..3f014236440 100644
--- a/messagebus/src/tests/routablequeue/routablequeue.cpp
+++ b/messagebus/src/tests/routablequeue/routablequeue.cpp
@@ -1,7 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("routablequeue_test");
#include <vespa/messagebus/routablequeue.h>
#include <vespa/messagebus/testlib/simplemessage.h>
@@ -16,8 +13,8 @@ private:
static uint32_t _cnt;
public:
TestMessage(uint32_t id) : SimpleMessage(""), _id(id) { ++_cnt; }
- virtual ~TestMessage() { --_cnt; }
- virtual uint32_t getType() const override { return _id; }
+ ~TestMessage() { --_cnt; }
+ uint32_t getType() const override { return _id; }
static uint32_t getCnt() { return _cnt; }
};
uint32_t TestMessage::_cnt = 0;
@@ -28,8 +25,8 @@ private:
static uint32_t _cnt;
public:
TestReply(uint32_t id) : SimpleReply(""), _id(id) { ++_cnt; }
- virtual ~TestReply() { --_cnt; }
- virtual uint32_t getType() const override { return _id; }
+ ~TestReply() { --_cnt; }
+ uint32_t getType() const override { return _id; }
static uint32_t getCnt() { return _cnt; }
};
uint32_t TestReply::_cnt = 0;
diff --git a/messagebus/src/tests/routeparser/routeparser.cpp b/messagebus/src/tests/routeparser/routeparser.cpp
index a00cea825ba..fc000fe571b 100644
--- a/messagebus/src/tests/routeparser/routeparser.cpp
+++ b/messagebus/src/tests/routeparser/routeparser.cpp
@@ -1,7 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("routeparser_test");
#include <vespa/messagebus/errorcode.h>
#include <vespa/messagebus/routing/errordirective.h>
@@ -16,6 +13,9 @@ LOG_SETUP("routeparser_test");
#include <vespa/messagebus/testlib/testserver.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/log/log.h>
+LOG_SETUP("routeparser_test");
+
using namespace mbus;
class Test : public vespalib::TestApp {
diff --git a/messagebus/src/tests/routing/routing.cpp b/messagebus/src/tests/routing/routing.cpp
index 506d003a8b7..8fd2c3951e4 100644
--- a/messagebus/src/tests/routing/routing.cpp
+++ b/messagebus/src/tests/routing/routing.cpp
@@ -1,5 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include <vespa/messagebus/emptyreply.h>
#include <vespa/messagebus/errorcode.h>
#include <vespa/messagebus/messagebus.h>
@@ -15,8 +14,8 @@
#include <vespa/messagebus/testlib/testserver.h>
#include <vespa/vespalib/component/vtag.h>
#include <vespa/vespalib/testkit/testapp.h>
-#include <vespa/log/log.h>
+#include <vespa/log/log.h>
LOG_SETUP("routing_test");
using namespace mbus;
@@ -414,12 +413,9 @@ private:
public:
MyPolicy(const MyPolicyFactory &parent) :
_parent(parent)
- {
- // empty
- }
+ {}
- virtual void
- select(RoutingContext &ctx) override
+ void select(RoutingContext &ctx) override
{
if (!_parent._selectRoute.empty()) {
ctx.addChild(Route::parse(_parent._selectRoute));
@@ -433,9 +429,8 @@ public:
throw TestException();
}
}
-
- virtual void
- merge(RoutingContext &ctx) override
+
+ void merge(RoutingContext &ctx) override
{
if (_parent._mergeError != ErrorCode::NONE) {
Reply::UP reply(new EmptyReply());
diff --git a/messagebus/src/tests/routingcontext/routingcontext.cpp b/messagebus/src/tests/routingcontext/routingcontext.cpp
index 6ee62b4d697..281cf782a6b 100644
--- a/messagebus/src/tests/routingcontext/routingcontext.cpp
+++ b/messagebus/src/tests/routingcontext/routingcontext.cpp
@@ -1,7 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("routingcontext_test");
#include <vespa/messagebus/emptyreply.h>
#include <vespa/messagebus/errorcode.h>
diff --git a/messagebus/src/tests/sendadapter/sendadapter.cpp b/messagebus/src/tests/sendadapter/sendadapter.cpp
index bcac60d800a..5ab1e57f0d4 100644
--- a/messagebus/src/tests/sendadapter/sendadapter.cpp
+++ b/messagebus/src/tests/sendadapter/sendadapter.cpp
@@ -1,7 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("sendadapter_test");
#include <vespa/messagebus/messagebus.h>
#include <vespa/messagebus/testlib/receptor.h>
@@ -12,6 +9,9 @@ LOG_SETUP("sendadapter_test");
#include <vespa/messagebus/testlib/testserver.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/log/log.h>
+LOG_SETUP("sendadapter_test");
+
using namespace mbus;
////////////////////////////////////////////////////////////////////////////////
diff --git a/messagebus/src/tests/serviceaddress/serviceaddress.cpp b/messagebus/src/tests/serviceaddress/serviceaddress.cpp
index ec2d1374e9b..ea6261f0169 100644
--- a/messagebus/src/tests/serviceaddress/serviceaddress.cpp
+++ b/messagebus/src/tests/serviceaddress/serviceaddress.cpp
@@ -1,10 +1,12 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("serviceaddress_test");
#include <vespa/vespalib/testkit/testapp.h>
-#include <vespa/vespalib/util/vstringfmt.h>
+#include <vespa/messagebus/testlib/slobrok.h>
+#include <vespa/messagebus/testlib/testserver.h>
+#include <vespa/messagebus/testlib/receptor.h>
+#include <vespa/messagebus/testlib/simplemessage.h>
+#include <vespa/messagebus/testlib/simplereply.h>
+#include <vespa/messagebus/testlib/simpleprotocol.h>
#include <vespa/messagebus/messagebus.h>
#include <vespa/messagebus/sourcesession.h>
#include <vespa/messagebus/intermediatesession.h>
@@ -15,12 +17,7 @@ LOG_SETUP("serviceaddress_test");
#include <vespa/messagebus/routing/routingspec.h>
#include <vespa/messagebus/network/rpcservice.h>
#include <vespa/messagebus/sourcesessionparams.h>
-#include <vespa/messagebus/testlib/slobrok.h>
-#include <vespa/messagebus/testlib/testserver.h>
-#include <vespa/messagebus/testlib/receptor.h>
-#include <vespa/messagebus/testlib/simplemessage.h>
-#include <vespa/messagebus/testlib/simplereply.h>
-#include <vespa/messagebus/testlib/simpleprotocol.h>
+#include <vespa/vespalib/util/vstringfmt.h>
using namespace mbus;
diff --git a/messagebus/src/tests/servicepool/servicepool.cpp b/messagebus/src/tests/servicepool/servicepool.cpp
index 8601cfa8fee..76c366930d9 100644
--- a/messagebus/src/tests/servicepool/servicepool.cpp
+++ b/messagebus/src/tests/servicepool/servicepool.cpp
@@ -1,7 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("servicepool_test");
#include <vespa/messagebus/network/rpcnetwork.h>
#include <vespa/messagebus/testlib/slobrok.h>
diff --git a/messagebus/src/tests/shutdown/shutdown.cpp b/messagebus/src/tests/shutdown/shutdown.cpp
index 5f5fe847f57..1f6944adb9e 100644
--- a/messagebus/src/tests/shutdown/shutdown.cpp
+++ b/messagebus/src/tests/shutdown/shutdown.cpp
@@ -1,7 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("shutdown_test");
#include <vespa/messagebus/emptyreply.h>
#include <vespa/messagebus/errorcode.h>
diff --git a/messagebus/src/tests/sourcesession/sourcesession.cpp b/messagebus/src/tests/sourcesession/sourcesession.cpp
index 24d99f5d44f..a7fde7f28e0 100644
--- a/messagebus/src/tests/sourcesession/sourcesession.cpp
+++ b/messagebus/src/tests/sourcesession/sourcesession.cpp
@@ -1,7 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("sourcesession_test");
#include <vespa/messagebus/destinationsession.h>
#include <vespa/messagebus/error.h>
@@ -34,7 +31,7 @@ struct DelayedHandler : public IMessageHandler
~DelayedHandler() {
session.reset();
}
- virtual void handleMessage(Message::UP msg) override {
+ void handleMessage(Message::UP msg) override {
// 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...
diff --git a/messagebus/src/tests/targetpool/targetpool.cpp b/messagebus/src/tests/targetpool/targetpool.cpp
index 30744e74202..dda44765ba6 100644
--- a/messagebus/src/tests/targetpool/targetpool.cpp
+++ b/messagebus/src/tests/targetpool/targetpool.cpp
@@ -1,11 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include <vespa/messagebus/network/rpctargetpool.h>
#include <vespa/messagebus/testlib/slobrok.h>
#include <vespa/messagebus/testlib/testserver.h>
#include <vespa/vespalib/testkit/testapp.h>
-#include <vespa/log/log.h>
+#include <vespa/log/log.h>
LOG_SETUP("targetpool_test");
using namespace mbus;
diff --git a/messagebus/src/tests/throttling/throttling.cpp b/messagebus/src/tests/throttling/throttling.cpp
index acc5b2ddc4d..a1065c44487 100644
--- a/messagebus/src/tests/throttling/throttling.cpp
+++ b/messagebus/src/tests/throttling/throttling.cpp
@@ -1,7 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("throttling_test");
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/messagebus/destinationsession.h>
diff --git a/messagebus/src/tests/timeout/timeout.cpp b/messagebus/src/tests/timeout/timeout.cpp
index d51ee34a08b..a14176cb1ef 100644
--- a/messagebus/src/tests/timeout/timeout.cpp
+++ b/messagebus/src/tests/timeout/timeout.cpp
@@ -1,7 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("timeout_test");
+
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/messagebus/errorcode.h>
#include <vespa/messagebus/emptyreply.h>
diff --git a/messagebus/src/tests/trace-roundtrip/trace-roundtrip.cpp b/messagebus/src/tests/trace-roundtrip/trace-roundtrip.cpp
index 5a9324257b5..effe461c5a8 100644
--- a/messagebus/src/tests/trace-roundtrip/trace-roundtrip.cpp
+++ b/messagebus/src/tests/trace-roundtrip/trace-roundtrip.cpp
@@ -1,7 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("simple-roundtrip_test");
+
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/messagebus/emptyreply.h>
#include <vespa/messagebus/messagebus.h>