aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-04-25 18:22:00 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-04-25 18:22:00 +0200
commitd9a33c05e2b3f45cba50fd0f8c48c422541b1ee8 (patch)
tree1d97192477c4d2eaf51ead0f3c6f5873653b99da
parent575f2d7572ac68f9dfc6c6e0d4ea4240c3aac2e8 (diff)
Add missing override.
remove virtual on override. optimize includes.
-rw-r--r--documentapi/src/tests/loadtypes/testrunner.cpp5
-rw-r--r--documentapi/src/tests/policies/testframe.cpp6
-rw-r--r--documentapi/src/tests/policies/testframe.h2
-rw-r--r--documentapi/src/tests/replymerger/replymerger_test.cpp3
-rw-r--r--documentapi/src/tests/routablefactory/routablefactory.cpp1
-rw-r--r--documentapi/src/tests/systemstate/systemstate.cpp6
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/documentprotocol.h8
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatemessage.cpp9
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatemessage.h12
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.cpp5
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.h5
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/documentacceptedreply.h2
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/documentignoredreply.cpp3
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/documentignoredreply.h5
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/documentmessage.cpp8
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/documentmessage.h4
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/documentreply.h8
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/documentsummarymessage.h8
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/emptybucketsmessage.h6
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/feedanswer.cpp4
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/feedmessage.cpp4
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/feedmessage.h7
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/feedreply.cpp4
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/feedreply.h5
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/getbucketlistmessage.h8
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/getbucketlistreply.h2
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/getbucketstatemessage.h9
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/getdocumentmessage.cpp10
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/getdocumentmessage.h20
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/getdocumentreply.cpp7
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/getdocumentreply.h4
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/multioperationmessage.h4
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/putdocumentmessage.h2
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/removedocumentmessage.h2
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/removelocationmessage.h8
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/visitor.h24
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/policies/andpolicy.h17
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/policies/contentpolicy.h2
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/policies/documentrouteselectorpolicy.h8
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/policies/errorpolicy.h4
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/policies/externpolicy.h12
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/policies/externslobrokpolicy.h11
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/policies/loadbalancerpolicy.h9
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/policies/localservicepolicy.h16
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/policies/messagetypepolicy.cpp2
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/policies/messagetypepolicy.h8
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/policies/roundrobinpolicy.h16
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/policies/storagepolicy.h11
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/policies/subsetservicepolicy.h17
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/routablefactories50.h31
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/routablefactories51.h9
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/routingpolicyfactories.h5
-rw-r--r--messagebus/src/tests/context/context.cpp2
-rwxr-xr-xmessagebus/src/tests/create-test.sh6
-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/queue/queue.cpp4
-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/retrypolicy/retrypolicy.cpp3
-rw-r--r--messagebus/src/tests/routable/routable.cpp13
-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/rpcserviceaddress/rpcserviceaddress.cpp6
-rw-r--r--messagebus/src/tests/sendadapter/sendadapter.cpp6
-rw-r--r--messagebus/src/tests/sequencer/sequencer.cpp10
-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/simple-roundtrip/simple-roundtrip.cpp12
-rw-r--r--messagebus/src/tests/simpleprotocol/simpleprotocol.cpp17
-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
-rw-r--r--messagebus/src/vespa/messagebus/dynamicthrottlepolicy.h5
-rw-r--r--messagebus/src/vespa/messagebus/emptyreply.h7
-rw-r--r--messagebus/src/vespa/messagebus/error.h1
-rw-r--r--messagebus/src/vespa/messagebus/errorcode.h1
-rw-r--r--messagebus/src/vespa/messagebus/intermediatesession.h3
-rw-r--r--messagebus/src/vespa/messagebus/message.h7
-rw-r--r--messagebus/src/vespa/messagebus/messenger.h1
-rw-r--r--messagebus/src/vespa/messagebus/reply.h13
-rw-r--r--messagebus/src/vespa/messagebus/routablequeue.h4
-rw-r--r--messagebus/src/vespa/messagebus/routing/errordirective.cpp4
-rw-r--r--messagebus/src/vespa/messagebus/sendproxy.h5
-rw-r--r--messagebus/src/vespa/messagebus/staticthrottlepolicy.h5
-rw-r--r--messagebus/src/vespa/messagebus/systemtimer.h1
-rw-r--r--messagebus/src/vespa/messagebus/testlib/custompolicy.h7
-rw-r--r--messagebus/src/vespa/messagebus/testlib/receptor.h5
-rw-r--r--messagebus/src/vespa/messagebus/testlib/simplemessage.h8
-rw-r--r--messagebus/src/vespa/messagebus/testlib/simpleprotocol.h19
-rw-r--r--messagebus/src/vespa/messagebus/testlib/simplereply.h8
-rw-r--r--messagebus/src/vespa/messagebus/testlib/slobrok.cpp3
-rw-r--r--messagebus/src/vespa/messagebus/testlib/slobrok.h1
-rw-r--r--vdslib/src/tests/bucketdistribution/bucketdistributiontest.cpp6
-rw-r--r--vdslib/src/tests/container/documentlisttest.cpp13
-rw-r--r--vdslib/src/tests/container/documentsummarytest.cpp3
-rw-r--r--vdslib/src/tests/container/parameterstest.cpp3
-rw-r--r--vdslib/src/tests/container/searchresulttest.cpp3
-rw-r--r--vdslib/src/tests/distribution/bucketvector.cpp5
-rw-r--r--vdslib/src/tests/distribution/bucketvector.h2
-rw-r--r--vdslib/src/tests/distribution/datadistributiontest.cpp15
-rw-r--r--vdslib/src/tests/distribution/grouptest.cpp2
-rw-r--r--vdslib/src/tests/distribution/randombucket.cpp5
-rw-r--r--vdslib/src/tests/distribution/randombucket.h2
-rw-r--r--vdslib/src/tests/state/grouptest.cpp6
-rw-r--r--vdslib/src/tests/state/nodestatetest.cpp5
-rw-r--r--vdslib/src/tests/testrunner.cpp5
-rw-r--r--vdslib/src/tests/thread/taskschedulertest.cpp1
117 files changed, 220 insertions, 557 deletions
diff --git a/documentapi/src/tests/loadtypes/testrunner.cpp b/documentapi/src/tests/loadtypes/testrunner.cpp
index 71200f84224..bdcdcdab944 100644
--- a/documentapi/src/tests/loadtypes/testrunner.cpp
+++ b/documentapi/src/tests/loadtypes/testrunner.cpp
@@ -1,12 +1,11 @@
// 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>
#include <vespa/vdstestlib/cppunit/cppunittestrunner.h>
+#include <vespa/log/log.h>
LOG_SETUP("storagecppunittests");
int
-main(int argc, char **argv)
+main(int argc, const char *argv[])
{
vdstestlib::CppUnitTestRunner testRunner;
return testRunner.run(argc, argv);
diff --git a/documentapi/src/tests/policies/testframe.cpp b/documentapi/src/tests/policies/testframe.cpp
index 8d5b6585529..db8a1b48924 100644
--- a/documentapi/src/tests/policies/testframe.cpp
+++ b/documentapi/src/tests/policies/testframe.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(".testframe");
#include "testframe.h"
#include <vespa/messagebus/emptyreply.h>
@@ -11,6 +8,9 @@ LOG_SETUP(".testframe");
#include <vespa/messagebus/testlib/simpleprotocol.h>
#include <vespa/messagebus/testlib/simplereply.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".testframe");
+
using document::DocumentTypeRepo;
using namespace documentapi;
diff --git a/documentapi/src/tests/policies/testframe.h b/documentapi/src/tests/policies/testframe.h
index e0780733331..f0e37d979f3 100644
--- a/documentapi/src/tests/policies/testframe.h
+++ b/documentapi/src/tests/policies/testframe.h
@@ -197,8 +197,6 @@ public:
* @return Handle to the system state.
*/
documentapi::SystemStateHandle getSystemState();
-
- // Implements IReplyHandler.
void handleReply(mbus::Reply::UP reply) override;
};
diff --git a/documentapi/src/tests/replymerger/replymerger_test.cpp b/documentapi/src/tests/replymerger/replymerger_test.cpp
index 8803994b0cf..b26290e0bcd 100644
--- a/documentapi/src/tests/replymerger/replymerger_test.cpp
+++ b/documentapi/src/tests/replymerger/replymerger_test.cpp
@@ -1,8 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("replymerger_test");
-#include <vespa/fastos/fastos.h>
#include <iostream>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/documentapi/messagebus/replymerger.h>
diff --git a/documentapi/src/tests/routablefactory/routablefactory.cpp b/documentapi/src/tests/routablefactory/routablefactory.cpp
index 620142e803b..b4449891af2 100644
--- a/documentapi/src/tests/routablefactory/routablefactory.cpp
+++ b/documentapi/src/tests/routablefactory/routablefactory.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/document/repo/documenttyperepo.h>
#include <vespa/documentapi/messagebus/documentprotocol.h>
#include <vespa/documentapi/messagebus/routablefactories51.h>
diff --git a/documentapi/src/tests/systemstate/systemstate.cpp b/documentapi/src/tests/systemstate/systemstate.cpp
index a797f55c625..e3163937a3f 100644
--- a/documentapi/src/tests/systemstate/systemstate.cpp
+++ b/documentapi/src/tests/systemstate/systemstate.cpp
@@ -1,12 +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("systemstate_test");
#include <vespa/documentapi/messagebus/systemstate/systemstate.h>
#include <vespa/documentapi/messagebus/systemstate/systemstatehandle.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/log/log.h>
+LOG_SETUP("systemstate_test");
+
using namespace documentapi;
class Test : public vespalib::TestApp {
diff --git a/documentapi/src/vespa/documentapi/messagebus/documentprotocol.h b/documentapi/src/vespa/documentapi/messagebus/documentprotocol.h
index b35cce81b40..e1c2b7f4f35 100644
--- a/documentapi/src/vespa/documentapi/messagebus/documentprotocol.h
+++ b/documentapi/src/vespa/documentapi/messagebus/documentprotocol.h
@@ -303,17 +303,9 @@ public:
* @return The system state.
*/
SystemState &getSystemState() { return *_systemState; }
-
- // Implements IProtocol.
const mbus::string &getName() const override { return NAME; }
-
- // Implements IProtocol.
mbus::IRoutingPolicy::UP createPolicy(const mbus::string &name, const mbus::string &param) const override;
-
- // Implements IProtocol.
mbus::Blob encode(const vespalib::Version &version, const mbus::Routable &routable) const override;
-
- // Implements IProtocol.
mbus::Routable::UP decode(const vespalib::Version &version, mbus::BlobRef data) const override;
};
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatemessage.cpp b/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatemessage.cpp
index 4d874f2637c..f9c59f99197 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatemessage.cpp
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatemessage.cpp
@@ -1,12 +1,11 @@
// 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/vespalib/util/exceptions.h>
+
+#include "batchdocumentupdatemessage.h"
+#include "batchdocumentupdatereply.h"
#include <vespa/documentapi/messagebus/documentprotocol.h>
-#include <vespa/documentapi/messagebus/messages/batchdocumentupdatemessage.h>
-#include <vespa/documentapi/messagebus/messages/batchdocumentupdatereply.h>
-#include <vespa/document/base/idstring.h>
#include <vespa/document/select/parser.h>
#include <vespa/document/bucket/bucketselector.h>
+#include <vespa/vespalib/util/exceptions.h>
namespace documentapi {
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatemessage.h b/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatemessage.h
index c2e1e599ee8..1a7d6b84622 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatemessage.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatemessage.h
@@ -1,9 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
+#include "documentmessage.h"
+#include "writedocumentreply.h"
#include <vespa/document/update/documentupdate.h>
-#include <vespa/documentapi/messagebus/messages/documentmessage.h>
-#include <vespa/documentapi/messagebus/messages/writedocumentreply.h>
#include <vespa/document/bucket/bucketid.h>
#include <vespa/document/base/idstring.h>
@@ -53,19 +53,17 @@ public:
*/
const string& getGroup() const { return _group; }
- // Implements DocumentMessage.
- uint32_t getType() const;
+ uint32_t getType() const override;
/**
Returns a bucket id suitable for routing this message.
*/
const document::BucketId& getBucketId() const { return _bucketId; }
- string toString() const { return "batchdocumentupdatemessage"; }
+ string toString() const override { return "batchdocumentupdatemessage"; }
protected:
- // Implements DocumentMessage.
- DocumentReply::UP doCreateReply() const;
+ DocumentReply::UP doCreateReply() const override;
private:
uint64_t _userId;
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.cpp b/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.cpp
index 533559a36c3..de0135a7af6 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.cpp
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.cpp
@@ -1,8 +1,7 @@
// 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 "batchdocumentupdatereply.h"
#include <vespa/documentapi/messagebus/documentprotocol.h>
-#include <vespa/documentapi/messagebus/messages/batchdocumentupdatereply.h>
-#include <vespa/documentapi/messagebus/messages/writedocumentreply.h>
namespace documentapi {
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.h b/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.h
index ec0aef31a5d..1464270c60a 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.h
@@ -1,7 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/documentapi/messagebus/messages/writedocumentreply.h>
+#include "writedocumentreply.h"
namespace documentapi {
@@ -23,8 +23,7 @@ public:
const std::vector<bool>& getDocumentsNotFound() const { return _documentsNotFound; }
std::vector<bool>& getDocumentsNotFound() { return _documentsNotFound; }
- string toString() const { return "batchdocumentupdatereply"; }
+ string toString() const override { return "batchdocumentupdatereply"; }
};
}
-
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/documentacceptedreply.h b/documentapi/src/vespa/documentapi/messagebus/messages/documentacceptedreply.h
index 58b766f2d81..19e29577648 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/documentacceptedreply.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/documentacceptedreply.h
@@ -1,7 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/documentapi/messagebus/messages/documentreply.h>
+#include "documentreply.h"
namespace documentapi {
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/documentignoredreply.cpp b/documentapi/src/vespa/documentapi/messagebus/messages/documentignoredreply.cpp
index acccf0dffa9..bfef421a1dd 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/documentignoredreply.cpp
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/documentignoredreply.cpp
@@ -1,7 +1,6 @@
// 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 "documentignoredreply.h"
#include <vespa/documentapi/messagebus/documentprotocol.h>
-#include <vespa/documentapi/messagebus/messages/documentignoredreply.h>
namespace documentapi {
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/documentignoredreply.h b/documentapi/src/vespa/documentapi/messagebus/messages/documentignoredreply.h
index ea1ba31b9ef..6df9fde1053 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/documentignoredreply.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/documentignoredreply.h
@@ -1,7 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/documentapi/messagebus/messages/documentreply.h>
+#include "documentreply.h"
namespace documentapi {
@@ -12,8 +12,7 @@ public:
DocumentIgnoredReply();
- string toString() const { return "DocumentIgnoredReply"; }
+ string toString() const override { return "DocumentIgnoredReply"; }
};
}
-
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/documentmessage.cpp b/documentapi/src/vespa/documentapi/messagebus/messages/documentmessage.cpp
index 6d1356a2c08..e2903097934 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/documentmessage.cpp
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/documentmessage.cpp
@@ -1,9 +1,7 @@
// 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/documentapi/messagebus/messages/documentmessage.h>
+#include "documentmessage.h"
#include <vespa/documentapi/messagebus/documentprotocol.h>
-#include <vespa/documentapi/messagebus/priority.h>
namespace documentapi {
@@ -12,9 +10,7 @@ DocumentMessage::DocumentMessage() :
_priority(Priority::PRI_NORMAL_3),
_loadType(LoadType::DEFAULT),
_approxSize(1024)
-{
- // empty
-}
+{}
mbus::Reply::UP
DocumentMessage::createReply() const
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/documentmessage.h b/documentapi/src/vespa/documentapi/messagebus/messages/documentmessage.h
index b4adf41ca79..3b2bc9cd3d9 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/documentmessage.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/documentmessage.h
@@ -2,10 +2,9 @@
#pragma once
#include "documentreply.h"
+#include <vespa/documentapi/loadtypes/loadtype.h>
#include <vespa/messagebus/message.h>
#include <vespa/messagebus/reply.h>
-#include <vespa/documentapi/loadtypes/loadtype.h>
-#include <vespa/documentapi/messagebus/priority.h>
namespace documentapi {
@@ -82,7 +81,6 @@ public:
_approxSize = approxSize;
}
- // Implements mbus::Message.
const mbus::string& getProtocol() const override;
};
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/documentreply.h b/documentapi/src/vespa/documentapi/messagebus/messages/documentreply.h
index 2850c412807..69563bcc63b 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/documentreply.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/documentreply.h
@@ -32,7 +32,7 @@ public:
/**
* Virtual destructor required for inheritance.
*/
- virtual ~DocumentReply() { }
+ ~DocumentReply() { }
/**
* Returns the priority tag for this message. This is an optional tag added for VDS that is not interpreted by the
@@ -41,7 +41,6 @@ public:
* @return The priority.
*/
Priority::Value getPriority() const { return _priority; }
-
uint8_t priority() const override { return (uint8_t)_priority; }
/**
@@ -50,13 +49,8 @@ public:
* @param priority The priority to set.
*/
void setPriority(Priority::Value p) { _priority = p; }
-
- // Implements mbus::Reply.
const mbus::string& getProtocol() const override;
-
- // Implements mbus::Reply.
uint32_t getType() const override { return _type; }
};
}
-
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/documentsummarymessage.h b/documentapi/src/vespa/documentapi/messagebus/messages/documentsummarymessage.h
index ac5e141da23..0c9c8b09a0c 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/documentsummarymessage.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/documentsummarymessage.h
@@ -1,8 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
+#include "visitor.h"
#include <vespa/vdslib/container/documentsummary.h>
-#include <vespa/documentapi/messagebus/messages/visitor.h>
namespace documentapi {
@@ -30,15 +30,9 @@ public:
* @param summary The document summary to contain.
*/
DocumentSummaryMessage(const vdslib::DocumentSummary &summary);
-
- // Overrides VisitorMessage.
uint32_t getApproxSize() const override;
-
- // Implements VisitorMessage.
uint32_t getType() const override;
-
string toString() const override { return "documentsummarymessage"; }
};
}
-
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/emptybucketsmessage.h b/documentapi/src/vespa/documentapi/messagebus/messages/emptybucketsmessage.h
index 54ce4e8de4c..bd1805a4a17 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/emptybucketsmessage.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/emptybucketsmessage.h
@@ -1,8 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
+#include "visitor.h"
#include <vespa/document/bucket/bucketid.h>
-#include <vespa/documentapi/messagebus/messages/visitor.h>
namespace documentapi {
@@ -21,18 +21,14 @@ protected:
public:
EmptyBucketsMessage(); // must be serialized into
-
EmptyBucketsMessage(const std::vector<document::BucketId> &bucketIds);
std::vector<document::BucketId> &getBucketIds() { return _bucketIds; }
const std::vector<document::BucketId> &getBucketIds() const { return _bucketIds; }
void setBucketIds(const std::vector<document::BucketId> &bucketIds);
-
void resize(uint32_t size);
-
uint32_t getType() const override;
-
string toString() const override { return "emptybucketsmessage"; }
};
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/feedanswer.cpp b/documentapi/src/vespa/documentapi/messagebus/messages/feedanswer.cpp
index 2cf6fc10dae..dd5b2bd9a5b 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/feedanswer.cpp
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/feedanswer.cpp
@@ -1,6 +1,6 @@
// 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/documentapi/messagebus/messages/feedanswer.h>
+
+#include "feedanswer.h"
namespace documentapi {
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/feedmessage.cpp b/documentapi/src/vespa/documentapi/messagebus/messages/feedmessage.cpp
index e3e61f888fb..b5f92588ea0 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/feedmessage.cpp
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/feedmessage.cpp
@@ -1,6 +1,6 @@
// 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/documentapi/messagebus/messages/feedmessage.h>
+
+#include "feedmessage.h"
namespace documentapi {
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/feedmessage.h b/documentapi/src/vespa/documentapi/messagebus/messages/feedmessage.h
index 11291359333..1fcfdc38a5d 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/feedmessage.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/feedmessage.h
@@ -1,16 +1,15 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/document/util/bytebuffer.h>
-#include <vespa/documentapi/messagebus/messages/documentmessage.h>
+#include "documentmessage.h"
namespace documentapi {
class FeedMessage : public DocumentMessage {
private:
string _name;
- int _generation;
- int _increment;
+ int _generation;
+ int _increment;
public:
/**
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/feedreply.cpp b/documentapi/src/vespa/documentapi/messagebus/messages/feedreply.cpp
index 98e90c22367..c1a56fdfa3d 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/feedreply.cpp
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/feedreply.cpp
@@ -1,6 +1,6 @@
// 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/documentapi/messagebus/messages/feedreply.h>
+
+#include "feedreply.h"
namespace documentapi {
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/feedreply.h b/documentapi/src/vespa/documentapi/messagebus/messages/feedreply.h
index 1b61278bf49..bb4a5facca1 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/feedreply.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/feedreply.h
@@ -1,9 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/document/util/bytebuffer.h>
-#include <vespa/documentapi/messagebus/messages/documentreply.h>
-#include <vespa/documentapi/messagebus/messages/feedanswer.h>
+#include "documentreply.h"
+#include "feedanswer.h"
namespace documentapi {
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/getbucketlistmessage.h b/documentapi/src/vespa/documentapi/messagebus/messages/getbucketlistmessage.h
index c08e36aa3fd..2e1e92652d9 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/getbucketlistmessage.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/getbucketlistmessage.h
@@ -40,18 +40,10 @@ public:
* @param id The bucket id to set.
*/
void setBucketId(const document::BucketId& id) { _bucketId = id; }
-
- // Overrides DocumentMessage.
bool hasSequenceId() const override;
-
- // Overrides DocumentMessage.
uint64_t getSequenceId() const override;
-
- // Implements DocumentMessage.
uint32_t getType() const override;
-
string toString() const override { return "getbucketlistmessage"; }
};
}
-
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/getbucketlistreply.h b/documentapi/src/vespa/documentapi/messagebus/messages/getbucketlistreply.h
index a207ef206e4..0b7df089bce 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/getbucketlistreply.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/getbucketlistreply.h
@@ -1,7 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/documentapi/messagebus/messages/documentreply.h>
+#include "documentreply.h"
#include <vespa/document/bucket/bucketid.h>
namespace documentapi {
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/getbucketstatemessage.h b/documentapi/src/vespa/documentapi/messagebus/messages/getbucketstatemessage.h
index ed27ed11212..62129a79003 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/getbucketstatemessage.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/getbucketstatemessage.h
@@ -1,8 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
+#include "documentmessage.h"
#include <vespa/document/bucket/bucketid.h>
-#include <vespa/documentapi/messagebus/messages/documentmessage.h>
namespace documentapi {
@@ -40,16 +40,9 @@ public:
* @param bucket The bucket id to set.
*/
void setBucketId(document::BucketId bucket) { _bucket = bucket; }
-
- // Overrides DocumentMessage.
bool hasSequenceId() const override;
-
- // Overrides DocumentMessage.
uint64_t getSequenceId() const override;
-
- // Implements DocumentMessage.
uint32_t getType() const override;
-
string toString() const override { return "getbucketstatemessage"; }
};
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/getdocumentmessage.cpp b/documentapi/src/vespa/documentapi/messagebus/messages/getdocumentmessage.cpp
index 08df8a88c50..87ce618d662 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/getdocumentmessage.cpp
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/getdocumentmessage.cpp
@@ -1,8 +1,8 @@
// 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 "getdocumentmessage.h"
+#include "getdocumentreply.h"
#include <vespa/documentapi/messagebus/documentprotocol.h>
-#include <vespa/documentapi/messagebus/messages/getdocumentmessage.h>
-#include <vespa/documentapi/messagebus/messages/getdocumentreply.h>
namespace documentapi {
@@ -10,9 +10,7 @@ GetDocumentMessage::GetDocumentMessage() :
DocumentMessage(),
_documentId(),
_fieldSet("[all]")
-{
- // empty
-}
+{}
GetDocumentMessage::GetDocumentMessage(const document::DocumentId &documentId, int flags) :
DocumentMessage(),
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/getdocumentmessage.h b/documentapi/src/vespa/documentapi/messagebus/messages/getdocumentmessage.h
index b174c729cae..40c184c2136 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/getdocumentmessage.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/getdocumentmessage.h
@@ -1,8 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
+#include "documentmessage.h"
#include <vespa/document/base/documentid.h>
-#include <vespa/documentapi/messagebus/messages/documentmessage.h>
namespace documentapi {
@@ -12,8 +12,7 @@ private:
string _fieldSet; // Comma-separated list of fields to return
protected:
- // Implements DocumentMessage.
- DocumentReply::UP doCreateReply() const;
+ DocumentReply::UP doCreateReply() const override;
public:
/**
@@ -85,17 +84,10 @@ public:
*/
const string& getFieldSet() const { return _fieldSet; }
- // Overrides DocumentMessage.
- bool hasSequenceId() const;
-
- // Overrides DocumentMessage.
- uint64_t getSequenceId() const;
-
- // Implements DocumentMessage.
- uint32_t getType() const;
-
- string toString() const { return "getdocumentmessage"; }
+ bool hasSequenceId() const override;
+ uint64_t getSequenceId() const override;
+ uint32_t getType() const override;
+ string toString() const override { return "getdocumentmessage"; }
};
}
-
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/getdocumentreply.cpp b/documentapi/src/vespa/documentapi/messagebus/messages/getdocumentreply.cpp
index b8a952bd421..162dbe9c7d8 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/getdocumentreply.cpp
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/getdocumentreply.cpp
@@ -1,6 +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/documentapi/messagebus/messages/getdocumentreply.h>
+#include "getdocumentreply.h"
#include <vespa/documentapi/messagebus/documentprotocol.h>
namespace documentapi {
@@ -9,9 +8,7 @@ GetDocumentReply::GetDocumentReply() :
DocumentAcceptedReply(DocumentProtocol::REPLY_GETDOCUMENT),
_document(),
_lastModified(0)
-{
- // empty
-}
+{}
GetDocumentReply::GetDocumentReply(document::Document::SP document) :
DocumentAcceptedReply(DocumentProtocol::REPLY_GETDOCUMENT),
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/getdocumentreply.h b/documentapi/src/vespa/documentapi/messagebus/messages/getdocumentreply.h
index daf20f1743d..6f5517176c3 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/getdocumentreply.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/getdocumentreply.h
@@ -1,8 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
+#include "documentacceptedreply.h"
#include <vespa/document/fieldvalue/document.h>
-#include <vespa/documentapi/messagebus/messages/documentacceptedreply.h>
namespace documentapi {
@@ -65,7 +65,7 @@ public:
*/
void setLastModified(uint64_t lastModified);
- string toString() const { return "getdocumentreply"; }
+ string toString() const override { return "getdocumentreply"; }
};
}
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/multioperationmessage.h b/documentapi/src/vespa/documentapi/messagebus/messages/multioperationmessage.h
index ac78aea6251..4c6f8bf9de7 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/multioperationmessage.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/multioperationmessage.h
@@ -1,12 +1,12 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
+#include "visitor.h"
+#include "documentreply.h"
#include <vespa/vdslib/container/parameters.h>
#include <vespa/vdslib/container/documentlist.h>
#include <vespa/vdslib/container/operationlist.h>
#include <vespa/document/bucket/bucketid.h>
-#include <vespa/documentapi/messagebus/messages/visitor.h>
-#include <vespa/documentapi/messagebus/messages/documentreply.h>
#include <vespa/documentapi/messagebus/documentprotocol.h>
namespace documentapi {
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/putdocumentmessage.h b/documentapi/src/vespa/documentapi/messagebus/messages/putdocumentmessage.h
index 46af0dfb7a4..4537da0fb6e 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/putdocumentmessage.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/putdocumentmessage.h
@@ -1,8 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
+#include "testandsetmessage.h"
#include <vespa/document/fieldvalue/document.h>
-#include <vespa/documentapi/messagebus/messages/testandsetmessage.h>
namespace documentapi {
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/removedocumentmessage.h b/documentapi/src/vespa/documentapi/messagebus/messages/removedocumentmessage.h
index 3904cf0f243..a47e35f3098 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/removedocumentmessage.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/removedocumentmessage.h
@@ -1,8 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
+#include "testandsetmessage.h"
#include <vespa/document/base/documentid.h>
-#include <vespa/documentapi/messagebus/messages/testandsetmessage.h>
namespace documentapi {
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/removelocationmessage.h b/documentapi/src/vespa/documentapi/messagebus/messages/removelocationmessage.h
index acaf3357d4d..ce15fe4eda0 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/removelocationmessage.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/removelocationmessage.h
@@ -1,7 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/documentapi/messagebus/messages/documentmessage.h>
+#include "documentmessage.h"
#include <vespa/document/bucket/bucketid.h>
#include <vespa/document/bucket/bucketselector.h>
#include <vespa/document/select/parser.h>
@@ -17,13 +17,9 @@ public:
RemoveLocationMessage(const document::BucketIdFactory& factory, document::select::Parser& parser, const string& documentSelection);
const string& getDocumentSelection() const { return _documentSelection; }
-
- uint32_t getType() const override;
-
const document::BucketId& getBucketId() const { return _bucketId; };
-
+ uint32_t getType() const override;
string toString() const override { return "removelocationmessage"; }
-
protected:
DocumentReply::UP doCreateReply() const override;
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/visitor.h b/documentapi/src/vespa/documentapi/messagebus/messages/visitor.h
index 43045fd44c6..ce30be3ecc2 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/visitor.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/visitor.h
@@ -1,20 +1,16 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-/**
- * @file persistence.h
- *
- * Persistence related commands, like put, get & remove
- */
+
#pragma once
+#include "writedocumentreply.h"
+#include "documentmessage.h"
+#include "documentreply.h"
#include <vespa/vdslib/container/parameters.h>
#include <vespa/vdslib/container/documentlist.h>
#include <vespa/vdslib/container/visitorstatistics.h>
#include <vespa/document/bucket/bucketid.h>
-#include <vespa/documentapi/messagebus/messages/documentmessage.h>
-#include <vespa/documentapi/messagebus/messages/documentreply.h>
#include <vespa/documentapi/messagebus/documentprotocol.h>
#include <vespa/document/select/orderingspecification.h>
-#include <vespa/documentapi/messagebus/messages/writedocumentreply.h>
namespace documentapi {
@@ -139,14 +135,12 @@ public:
typedef std::unique_ptr<DestroyVisitorMessage> UP;
DestroyVisitorMessage(); // must be deserialized into
-
DestroyVisitorMessage(const string &instanceId);
const string& getInstanceId() const { return _instanceId; }
void setInstanceId(const string& id) { _instanceId = id; }
uint32_t getType() const override;
-
string toString() const override { return "destroyvisitormessage"; }
};
@@ -214,7 +208,6 @@ public:
void setErrorMessage(const string& errorMessage) { _errorMessage = errorMessage; };
uint32_t getType() const override;
-
string toString() const override { return "visitorinfomessage"; }
};
@@ -241,7 +234,6 @@ public:
uint32_t getApproxSize() const override;
uint32_t getType() const override;
-
string toString() const override { return "mapvisitormessage"; }
};
@@ -256,12 +248,9 @@ public:
class Entry {
public:
Entry();
- Entry(int64_t timestamp,
- document::Document::SP doc,
- bool removeEntry);
+ Entry(int64_t timestamp, document::Document::SP doc, bool removeEntry);
Entry(const Entry& other);
- Entry(const document::DocumentTypeRepo &repo,
- document::ByteBuffer& buf);
+ Entry(const document::DocumentTypeRepo &repo, document::ByteBuffer& buf);
int64_t getTimestamp() { return _timestamp; }
const document::Document::SP& getDocument() { return _document; }
@@ -293,7 +282,6 @@ public:
const std::vector<Entry>& getDocuments() const { return _documents; };
uint32_t getType() const override;
-
string toString() const override { return "documentlistmessage"; }
};
diff --git a/documentapi/src/vespa/documentapi/messagebus/policies/andpolicy.h b/documentapi/src/vespa/documentapi/messagebus/policies/andpolicy.h
index 0edba2c0872..a5dc1872e44 100644
--- a/documentapi/src/vespa/documentapi/messagebus/policies/andpolicy.h
+++ b/documentapi/src/vespa/documentapi/messagebus/policies/andpolicy.h
@@ -1,7 +1,6 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vector>
#include <vespa/messagebus/routing/hop.h>
#include <vespa/messagebus/routing/iroutingpolicy.h>
#include <vespa/documentapi/common.h>
@@ -26,19 +25,9 @@ public:
* @param param A string of recipients to select unless recipients have been configured.
*/
ANDPolicy(const string& param);
-
- /**
- * Destructor.
- *
- * Frees all allocated resources.
- */
- virtual ~ANDPolicy();
-
- // Inherit doc from IRoutingPolicy.
- virtual void select(mbus::RoutingContext &context) override;
-
- // Inherit doc from IRoutingPolicy.
- virtual void merge(mbus::RoutingContext &context) override;
+ ~ANDPolicy();
+ void select(mbus::RoutingContext &context) override;
+ void merge(mbus::RoutingContext &context) override;
private:
ANDPolicy(const ANDPolicy &); // hide
diff --git a/documentapi/src/vespa/documentapi/messagebus/policies/contentpolicy.h b/documentapi/src/vespa/documentapi/messagebus/policies/contentpolicy.h
index 2f901ebad2d..bf17a77ca6a 100644
--- a/documentapi/src/vespa/documentapi/messagebus/policies/contentpolicy.h
+++ b/documentapi/src/vespa/documentapi/messagebus/policies/contentpolicy.h
@@ -10,7 +10,7 @@ class ContentPolicy : public StoragePolicy
public:
ContentPolicy(const string& param);
private:
- virtual string createConfigId(const string & clusterName) const override;
+ string createConfigId(const string & clusterName) const override;
};
}
diff --git a/documentapi/src/vespa/documentapi/messagebus/policies/documentrouteselectorpolicy.h b/documentapi/src/vespa/documentapi/messagebus/policies/documentrouteselectorpolicy.h
index 678210b1416..362185576ff 100644
--- a/documentapi/src/vespa/documentapi/messagebus/policies/documentrouteselectorpolicy.h
+++ b/documentapi/src/vespa/documentapi/messagebus/policies/documentrouteselectorpolicy.h
@@ -1,11 +1,11 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
+#include "config-documentrouteselectorpolicy.h"
#include <vespa/document/select/node.h>
#include <map>
#include <vespa/messagebus/routing/iroutingpolicy.h>
#include <vespa/vespalib/util/sync.h>
-#include <vespa/documentapi/messagebus/policies/config-documentrouteselectorpolicy.h>
#include <vespa/documentapi/common.h>
#include <vespa/config/config.h>
#include <vespa/config/helper/configfetcher.h>
@@ -64,14 +64,8 @@ public:
* @return The error string, or null if no error.
*/
const string &getError() const;
-
- // Implements Subscriber.
void configure(std::unique_ptr<messagebus::protocol::DocumentrouteselectorpolicyConfig> cfg) override;
-
- // Implements IRoutingPolicy.
void select(mbus::RoutingContext &context) override;
-
- // Implements IRoutingPolicy.
void merge(mbus::RoutingContext &context) override;
};
diff --git a/documentapi/src/vespa/documentapi/messagebus/policies/errorpolicy.h b/documentapi/src/vespa/documentapi/messagebus/policies/errorpolicy.h
index 790e0ab923c..fddccb1e3d9 100644
--- a/documentapi/src/vespa/documentapi/messagebus/policies/errorpolicy.h
+++ b/documentapi/src/vespa/documentapi/messagebus/policies/errorpolicy.h
@@ -22,11 +22,7 @@ public:
* @param msg The message of the error to assign.
*/
ErrorPolicy(const string &msg);
-
- // Implements IRoutingPolicy.
void select(mbus::RoutingContext &context) override;
-
- // Implements IRoutingPolicy.
void merge(mbus::RoutingContext &context) override;
};
diff --git a/documentapi/src/vespa/documentapi/messagebus/policies/externpolicy.h b/documentapi/src/vespa/documentapi/messagebus/policies/externpolicy.h
index d1e01cdbe59..9dd400f69c3 100644
--- a/documentapi/src/vespa/documentapi/messagebus/policies/externpolicy.h
+++ b/documentapi/src/vespa/documentapi/messagebus/policies/externpolicy.h
@@ -51,13 +51,7 @@ public:
* @param param The address to use for this, if empty this will resolve to hostname.
*/
ExternPolicy(const string &param);
-
- /**
- * Destructor.
- *
- * Frees all allocated resources.
- */
- virtual ~ExternPolicy();
+ ~ExternPolicy();
/**
* This is a safety mechanism to allow the constructor to fail and signal that it can not be used.
@@ -74,11 +68,7 @@ public:
* @return The mirror pointer.
*/
slobrok::api::IMirrorAPI &getMirror() { return *_mirror; }
-
- // Overrides IRoutingPolicy.
void select(mbus::RoutingContext &ctx) override;
-
- // Overrides IRoutingPolicy.
void merge(mbus::RoutingContext &ctx) override;
};
diff --git a/documentapi/src/vespa/documentapi/messagebus/policies/externslobrokpolicy.h b/documentapi/src/vespa/documentapi/messagebus/policies/externslobrokpolicy.h
index 6a2a673807f..825c4a85d35 100644
--- a/documentapi/src/vespa/documentapi/messagebus/policies/externslobrokpolicy.h
+++ b/documentapi/src/vespa/documentapi/messagebus/policies/externslobrokpolicy.h
@@ -1,7 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/documentapi/messagebus/policies/asyncinitializationpolicy.h>
+#include "asyncinitializationpolicy.h"
#include <vespa/config-slobroks.h>
#include <vespa/vdslib/distribution/distribution.h>
#include <vespa/slobrok/imirrorapi.h>
@@ -29,20 +29,15 @@ protected:
public:
ExternSlobrokPolicy(const std::map<string, string>& params);
- virtual ~ExternSlobrokPolicy();
+ ~ExternSlobrokPolicy();
/**
* @return a pointer to the slobrok mirror owned by this policy, if any.
* If the policy uses the default mirror API, NULL is returned.
*/
const slobrok::api::IMirrorAPI* getMirror() const { return _mirror.get(); }
-
slobrok::api::IMirrorAPI::SpecList lookup(mbus::RoutingContext &context, const string& pattern);
-
- /**
- * Initializes the policy
- */
- virtual string init() override;
+ string init() override;
};
}
diff --git a/documentapi/src/vespa/documentapi/messagebus/policies/loadbalancerpolicy.h b/documentapi/src/vespa/documentapi/messagebus/policies/loadbalancerpolicy.h
index 0541b784b1f..7b0e7e1f110 100644
--- a/documentapi/src/vespa/documentapi/messagebus/policies/loadbalancerpolicy.h
+++ b/documentapi/src/vespa/documentapi/messagebus/policies/loadbalancerpolicy.h
@@ -1,8 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/documentapi/messagebus/policies/loadbalancer.h>
-#include <vespa/documentapi/messagebus/policies/externslobrokpolicy.h>
+#include "loadbalancer.h"
+#include "externslobrokpolicy.h"
namespace documentapi {
@@ -10,8 +10,7 @@ class LoadBalancerPolicy : public ExternSlobrokPolicy
{
public:
LoadBalancerPolicy(const string& param);
-
- virtual void doSelect(mbus::RoutingContext &context) override;
+ void doSelect(mbus::RoutingContext &context) override;
/**
Finds the TCP address of the target docproc.
@@ -22,7 +21,7 @@ public:
return _loadBalancer->getRecipient(lookup(context, _pattern));
}
- virtual void merge(mbus::RoutingContext &context) override;
+ void merge(mbus::RoutingContext &context) override;
private:
string _pattern;
diff --git a/documentapi/src/vespa/documentapi/messagebus/policies/localservicepolicy.h b/documentapi/src/vespa/documentapi/messagebus/policies/localservicepolicy.h
index af63403a8b1..d471e3051c8 100644
--- a/documentapi/src/vespa/documentapi/messagebus/policies/localservicepolicy.h
+++ b/documentapi/src/vespa/documentapi/messagebus/policies/localservicepolicy.h
@@ -74,19 +74,9 @@ public:
* @param param The address to use for this, if empty this will resolve to hostname.
*/
LocalServicePolicy(const string &param);
-
- /**
- * Destructor.
- *
- * Frees all allocated resources.
- */
- virtual ~LocalServicePolicy();
-
- // Inherit doc from IRoutingPolicy.
- virtual void select(mbus::RoutingContext &context) override;
-
- // Inherit doc from IRoutingPolicy.
- virtual void merge(mbus::RoutingContext &context) override;
+ ~LocalServicePolicy();
+ void select(mbus::RoutingContext &context) override;
+ void merge(mbus::RoutingContext &context) override;
};
}
diff --git a/documentapi/src/vespa/documentapi/messagebus/policies/messagetypepolicy.cpp b/documentapi/src/vespa/documentapi/messagebus/policies/messagetypepolicy.cpp
index f55967b1c09..4d260a8e81f 100644
--- a/documentapi/src/vespa/documentapi/messagebus/policies/messagetypepolicy.cpp
+++ b/documentapi/src/vespa/documentapi/messagebus/policies/messagetypepolicy.cpp
@@ -18,6 +18,8 @@ MessageTypePolicy::MessageTypePolicy(const config::ConfigUri & configUri) :
_fetcher.start();
}
+MessageTypePolicy::~MessageTypePolicy() {}
+
void
MessageTypePolicy::configure(std::unique_ptr<MessagetyperouteselectorpolicyConfig> cfg)
{
diff --git a/documentapi/src/vespa/documentapi/messagebus/policies/messagetypepolicy.h b/documentapi/src/vespa/documentapi/messagebus/policies/messagetypepolicy.h
index d29439db50c..d9a324a79c5 100644
--- a/documentapi/src/vespa/documentapi/messagebus/policies/messagetypepolicy.h
+++ b/documentapi/src/vespa/documentapi/messagebus/policies/messagetypepolicy.h
@@ -43,16 +43,10 @@ public:
* @param configUri The configuration uri to subscribe with.
*/
MessageTypePolicy(const config::ConfigUri & configUri);
-
- // Implements Subscriber.
+ ~MessageTypePolicy();
void configure(std::unique_ptr<vespa::config::content::MessagetyperouteselectorpolicyConfig> cfg) override;
-
- // Implements IRoutingPolicy.
void select(mbus::RoutingContext &context) override;
-
- // Implements IRoutingPolicy.
void merge(mbus::RoutingContext &context) override;
};
}
-
diff --git a/documentapi/src/vespa/documentapi/messagebus/policies/roundrobinpolicy.h b/documentapi/src/vespa/documentapi/messagebus/policies/roundrobinpolicy.h
index 3a3a22090f9..a14c2afdbc7 100644
--- a/documentapi/src/vespa/documentapi/messagebus/policies/roundrobinpolicy.h
+++ b/documentapi/src/vespa/documentapi/messagebus/policies/roundrobinpolicy.h
@@ -61,19 +61,9 @@ public:
* in slobrok.
*/
RoundRobinPolicy(const string &param);
-
- /**
- * Destructor.
- *
- * Frees all allocated resources.
- */
- virtual ~RoundRobinPolicy();
-
- // Inherit doc from IRoutingPolicy.
- virtual void select(mbus::RoutingContext &context) override;
-
- // Inherit doc from IRoutingPolicy.
- virtual void merge(mbus::RoutingContext &context) override;
+ ~RoundRobinPolicy();
+ void select(mbus::RoutingContext &context) override;
+ void merge(mbus::RoutingContext &context) override;
};
}
diff --git a/documentapi/src/vespa/documentapi/messagebus/policies/storagepolicy.h b/documentapi/src/vespa/documentapi/messagebus/policies/storagepolicy.h
index ef6478e368a..c73c4c8560d 100644
--- a/documentapi/src/vespa/documentapi/messagebus/policies/storagepolicy.h
+++ b/documentapi/src/vespa/documentapi/messagebus/policies/storagepolicy.h
@@ -39,13 +39,9 @@ private:
public:
StoragePolicy(const string& param);
- virtual ~StoragePolicy();
-
- // Inherit doc from IRoutingPolicy.
- virtual void doSelect(mbus::RoutingContext &context) override;
-
- // Inherit doc from IRoutingPolicy.
- virtual void merge(mbus::RoutingContext &context) override;
+ ~StoragePolicy();
+ void doSelect(mbus::RoutingContext &context) override;
+ void merge(mbus::RoutingContext &context) override;
void updateStateFromReply(WrongDistributionReply& reply);
@@ -56,7 +52,6 @@ public:
const storage::lib::ClusterState* getSystemState() const { return _state.get(); }
virtual void configure(std::unique_ptr<storage::lib::Distribution::DistributionConfig> config);
-
string init() override;
private:
diff --git a/documentapi/src/vespa/documentapi/messagebus/policies/subsetservicepolicy.h b/documentapi/src/vespa/documentapi/messagebus/policies/subsetservicepolicy.h
index 49724785361..4d6dadb7156 100644
--- a/documentapi/src/vespa/documentapi/messagebus/policies/subsetservicepolicy.h
+++ b/documentapi/src/vespa/documentapi/messagebus/policies/subsetservicepolicy.h
@@ -65,20 +65,9 @@ public:
* @param param The number of services to include in the set.
*/
SubsetServicePolicy(const string &param);
-
- /**
- * Destructor.
- *
- * Frees all allocated resources.
- */
- virtual ~SubsetServicePolicy();
-
- // Inherit doc from IRoutingPolicy.
- virtual void select(mbus::RoutingContext &context) override;
-
- // Inherit doc from IRoutingPolicy.
- virtual void merge(mbus::RoutingContext &context) override;
+ ~SubsetServicePolicy();
+ void select(mbus::RoutingContext &context) override;
+ void merge(mbus::RoutingContext &context) override;
};
}
-
diff --git a/documentapi/src/vespa/documentapi/messagebus/routablefactories50.h b/documentapi/src/vespa/documentapi/messagebus/routablefactories50.h
index aed43b8b2e5..c715792f263 100644
--- a/documentapi/src/vespa/documentapi/messagebus/routablefactories50.h
+++ b/documentapi/src/vespa/documentapi/messagebus/routablefactories50.h
@@ -99,11 +99,7 @@ public:
*/
typedef std::unique_ptr<IRoutableFactory> UP;
typedef std::shared_ptr<IRoutableFactory> SP;
-
- // Implements IRoutableFactory.
bool encode(const mbus::Routable &obj, vespalib::GrowableByteBuffer &out) const override;
-
- // Implements IRoutableFactory.
mbus::Routable::UP decode(document::ByteBuffer &in, const LoadTypeSet& loadTypes) const override;
};
@@ -143,10 +139,7 @@ public:
typedef std::unique_ptr<IRoutableFactory> UP;
typedef std::shared_ptr<IRoutableFactory> SP;
- // Implements IRoutableFactory.
bool encode(const mbus::Routable &obj, vespalib::GrowableByteBuffer &out) const override;
-
- // Implements IRoutableFactory.
mbus::Routable::UP decode(document::ByteBuffer &in, const LoadTypeSet& loadTypes) const override;
};
@@ -180,8 +173,7 @@ public:
DocumentMessage::UP doDecode(document::ByteBuffer &buf) const override;
bool doEncode(const DocumentMessage &msg, vespalib::GrowableByteBuffer &buf) const override;
public:
- BatchDocumentUpdateMessageFactory(const document::DocumentTypeRepo &r)
- : _repo(r) {}
+ BatchDocumentUpdateMessageFactory(const document::DocumentTypeRepo &r) : _repo(r) {}
};
class BatchDocumentUpdateReplyFactory : public DocumentReplyFactory {
protected:
@@ -194,8 +186,7 @@ public:
DocumentMessage::UP doDecode(document::ByteBuffer &buf) const override;
bool doEncode(const DocumentMessage &msg, vespalib::GrowableByteBuffer &buf) const override;
public:
- CreateVisitorMessageFactory(const document::DocumentTypeRepo &r)
- : _repo(r) {}
+ CreateVisitorMessageFactory(const document::DocumentTypeRepo &r) : _repo(r) {}
};
class CreateVisitorReplyFactory : public DocumentReplyFactory {
protected:
@@ -285,8 +276,7 @@ public:
DocumentReply::UP doDecode(document::ByteBuffer &buf) const override;
bool doEncode(const DocumentReply &msg, vespalib::GrowableByteBuffer &buf) const override;
public:
- GetDocumentReplyFactory(const document::DocumentTypeRepo &r)
- : _repo(r) {}
+ GetDocumentReplyFactory(const document::DocumentTypeRepo &r) : _repo(r) {}
};
class MapVisitorMessageFactory : public DocumentMessageFactory {
const document::DocumentTypeRepo &_repo;
@@ -294,8 +284,7 @@ public:
DocumentMessage::UP doDecode(document::ByteBuffer &buf) const override;
bool doEncode(const DocumentMessage &msg, vespalib::GrowableByteBuffer &buf) const override;
public:
- MapVisitorMessageFactory(const document::DocumentTypeRepo &r)
- : _repo(r) {}
+ MapVisitorMessageFactory(const document::DocumentTypeRepo &r) : _repo(r) {}
};
class MapVisitorReplyFactory : public DocumentReplyFactory {
protected:
@@ -308,8 +297,7 @@ public:
DocumentMessage::UP doDecode(document::ByteBuffer &buf) const override;
bool doEncode(const DocumentMessage &msg, vespalib::GrowableByteBuffer &buf) const override;
public:
- MultiOperationMessageFactory(const document::DocumentTypeRepo::SP &r)
- : _repo(r) {}
+ MultiOperationMessageFactory(const document::DocumentTypeRepo::SP &r) : _repo(r) {}
};
class MultiOperationReplyFactory : public DocumentReplyFactory {
protected:
@@ -326,8 +314,7 @@ public:
bool doEncode(const DocumentMessage &msg, vespalib::GrowableByteBuffer &buf) const override;
public:
void decodeInto(PutDocumentMessage & msg, document::ByteBuffer & buf) const;
- PutDocumentMessageFactory(const document::DocumentTypeRepo &r)
- : _repo(r) {}
+ PutDocumentMessageFactory(const document::DocumentTypeRepo &r) : _repo(r) {}
};
class PutDocumentReplyFactory : public DocumentReplyFactory {
protected:
@@ -354,8 +341,7 @@ public:
DocumentMessage::UP doDecode(document::ByteBuffer &buf) const override;
bool doEncode(const DocumentMessage &msg, vespalib::GrowableByteBuffer &buf) const override;
public:
- RemoveLocationMessageFactory(const document::DocumentTypeRepo &r)
- : _repo(r) {}
+ RemoveLocationMessageFactory(const document::DocumentTypeRepo &r) : _repo(r) {}
};
class RemoveLocationReplyFactory : public DocumentReplyFactory {
protected:
@@ -402,8 +388,7 @@ public:
bool doEncode(const DocumentMessage &msg, vespalib::GrowableByteBuffer &buf) const override;
public:
void decodeInto(UpdateDocumentMessage & msg, document::ByteBuffer & buf) const;
- UpdateDocumentMessageFactory(const document::DocumentTypeRepo &r)
- : _repo(r) {}
+ UpdateDocumentMessageFactory(const document::DocumentTypeRepo &r) : _repo(r) {}
};
class UpdateDocumentReplyFactory : public DocumentReplyFactory {
protected:
diff --git a/documentapi/src/vespa/documentapi/messagebus/routablefactories51.h b/documentapi/src/vespa/documentapi/messagebus/routablefactories51.h
index bfa25c21d84..429c86e5049 100644
--- a/documentapi/src/vespa/documentapi/messagebus/routablefactories51.h
+++ b/documentapi/src/vespa/documentapi/messagebus/routablefactories51.h
@@ -58,10 +58,7 @@ public:
typedef std::unique_ptr<IRoutableFactory> UP;
typedef std::shared_ptr<IRoutableFactory> SP;
- // Implements IRoutableFactory.
bool encode(const mbus::Routable &obj, vespalib::GrowableByteBuffer &out) const override;
-
- // Implements IRoutableFactory.
mbus::Routable::UP decode(document::ByteBuffer &in, const LoadTypeSet& loadTypes) const override;
};
@@ -101,10 +98,7 @@ public:
typedef std::unique_ptr<IRoutableFactory> UP;
typedef std::shared_ptr<IRoutableFactory> SP;
- // Implements IRoutableFactory.
bool encode(const mbus::Routable &obj, vespalib::GrowableByteBuffer &out) const override;
-
- // Implements IRoutableFactory.
mbus::Routable::UP decode(document::ByteBuffer &in, const LoadTypeSet& loadTypes) const override;
};
@@ -145,8 +139,7 @@ public:
DocumentMessage::UP doDecode(document::ByteBuffer &buf) const override;
bool doEncode(const DocumentMessage &msg, vespalib::GrowableByteBuffer &buf) const override;
public:
- CreateVisitorMessageFactory(const document::DocumentTypeRepo &r)
- : _repo(r) {}
+ CreateVisitorMessageFactory(const document::DocumentTypeRepo &r) : _repo(r) {}
};
class GetDocumentMessageFactory : public DocumentMessageFactory {
diff --git a/documentapi/src/vespa/documentapi/messagebus/routingpolicyfactories.h b/documentapi/src/vespa/documentapi/messagebus/routingpolicyfactories.h
index 906fc508bd7..a41ae155170 100644
--- a/documentapi/src/vespa/documentapi/messagebus/routingpolicyfactories.h
+++ b/documentapi/src/vespa/documentapi/messagebus/routingpolicyfactories.h
@@ -36,9 +36,7 @@ public:
const document::DocumentTypeRepo &_repo;
string _configId;
public:
- DocumentRouteSelectorPolicyFactory(
- const document::DocumentTypeRepo &repo,
- const string &configId);
+ DocumentRouteSelectorPolicyFactory(const document::DocumentTypeRepo &repo, const string &configId);
mbus::IRoutingPolicy::UP createPolicy(const string &param) const override;
};
class ExternPolicyFactory : public IRoutingPolicyFactory {
@@ -68,4 +66,3 @@ public:
};
}
-
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/create-test.sh b/messagebus/src/tests/create-test.sh
index b5406dd24bd..4a7a559eb08 100755
--- a/messagebus/src/tests/create-test.sh
+++ b/messagebus/src/tests/create-test.sh
@@ -23,10 +23,10 @@ gen_project_file() {
gen_source() {
echo "generating '$1' ..."
- echo "#include <vespa/log/log.h>" > $1
- echo "LOG_SETUP(\"${test}_test\");" >> $1
- echo "#include <vespa/fastos/fastos.h>" >> $1
echo "#include <vespa/vespalib/testkit/testapp.h>" >> $1
+ echo "" >> $1
+ echo "#include <vespa/log/log.h>" >> $1
+ echo "LOG_SETUP(\"${test}_test\");" >> $1
echo "" >> $1
echo "// using namespace mbus;" >> $1
echo "" >> $1
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/queue/queue.cpp b/messagebus/src/tests/queue/queue.cpp
index 78bf09e2c48..27b31090346 100644
--- a/messagebus/src/tests/queue/queue.cpp
+++ b/messagebus/src/tests/queue/queue.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("queue_test");
+
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/messagebus/queue.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/retrypolicy/retrypolicy.cpp b/messagebus/src/tests/retrypolicy/retrypolicy.cpp
index 5426a1123cd..8c70eb5888a 100644
--- a/messagebus/src/tests/retrypolicy/retrypolicy.cpp
+++ b/messagebus/src/tests/retrypolicy/retrypolicy.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("retrypolicy_test");
#include <vespa/messagebus/errorcode.h>
#include <vespa/messagebus/routing/retrytransienterrorspolicy.h>
diff --git a/messagebus/src/tests/routable/routable.cpp b/messagebus/src/tests/routable/routable.cpp
index adde39dc51c..8a388ccbe8d 100644
--- a/messagebus/src/tests/routable/routable.cpp
+++ b/messagebus/src/tests/routable/routable.cpp
@@ -1,14 +1,13 @@
// 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("routable_test");
-#include <vespa/messagebus/error.h>
-#include <vespa/messagebus/errorcode.h>
-#include <vespa/messagebus/message.h>
-#include <vespa/messagebus/reply.h>
+
#include <vespa/messagebus/testlib/receptor.h>
#include <vespa/messagebus/testlib/simplemessage.h>
#include <vespa/messagebus/testlib/simplereply.h>
+#include <vespa/messagebus/message.h>
+#include <vespa/messagebus/reply.h>
+#include <vespa/messagebus/errorcode.h>
+#include <vespa/messagebus/error.h>
+
#include <vespa/vespalib/testkit/testapp.h>
using namespace mbus;
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/rpcserviceaddress/rpcserviceaddress.cpp b/messagebus/src/tests/rpcserviceaddress/rpcserviceaddress.cpp
index d5a002adf89..bd5cfa3d8cf 100644
--- a/messagebus/src/tests/rpcserviceaddress/rpcserviceaddress.cpp
+++ b/messagebus/src/tests/rpcserviceaddress/rpcserviceaddress.cpp
@@ -1,9 +1,7 @@
// 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("rpcserviceaddress_test");
-#include <vespa/vespalib/testkit/testapp.h>
+
#include <vespa/messagebus/network/rpcserviceaddress.h>
+#include <vespa/vespalib/testkit/testapp.h>
using namespace mbus;
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/sequencer/sequencer.cpp b/messagebus/src/tests/sequencer/sequencer.cpp
index 6db2455c4a8..4a8018a53b4 100644
--- a/messagebus/src/tests/sequencer/sequencer.cpp
+++ b/messagebus/src/tests/sequencer/sequencer.cpp
@@ -1,14 +1,14 @@
// 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("sequencer_test");
+#include <vespa/messagebus/testlib/simplemessage.h>
#include <vespa/messagebus/sequencer.h>
-#include <vespa/messagebus/emptyreply.h>
#include <vespa/messagebus/routablequeue.h>
-#include <vespa/messagebus/testlib/simplemessage.h>
+#include <vespa/messagebus/emptyreply.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/log/log.h>
+LOG_SETUP("sequencer_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/simple-roundtrip/simple-roundtrip.cpp b/messagebus/src/tests/simple-roundtrip/simple-roundtrip.cpp
index c59f072bd09..6e5b50a7469 100644
--- a/messagebus/src/tests/simple-roundtrip/simple-roundtrip.cpp
+++ b/messagebus/src/tests/simple-roundtrip/simple-roundtrip.cpp
@@ -1,21 +1,13 @@
// 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/messagebus.h>
-#include <vespa/messagebus/sourcesession.h>
-#include <vespa/messagebus/intermediatesession.h>
-#include <vespa/messagebus/destinationsession.h>
#include <vespa/messagebus/testlib/slobrok.h>
#include <vespa/messagebus/testlib/testserver.h>
-#include <vespa/messagebus/routing/routingspec.h>
#include <vespa/messagebus/testlib/receptor.h>
-#include <vespa/messagebus/sourcesessionparams.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/vespalib/testkit/testapp.h>
using namespace mbus;
diff --git a/messagebus/src/tests/simpleprotocol/simpleprotocol.cpp b/messagebus/src/tests/simpleprotocol/simpleprotocol.cpp
index c4268e5108d..23f604ecced 100644
--- a/messagebus/src/tests/simpleprotocol/simpleprotocol.cpp
+++ b/messagebus/src/tests/simpleprotocol/simpleprotocol.cpp
@@ -1,20 +1,17 @@
// 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/vespalib/testkit/testapp.h>
-#include <vespa/vespalib/component/vtag.h>
-#include <vespa/messagebus/errorcode.h>
-#include <vespa/messagebus/ireplyhandler.h>
-#include <vespa/messagebus/network/identity.h>
-#include <vespa/messagebus/routing/routingcontext.h>
+
#include <vespa/messagebus/testlib/receptor.h>
#include <vespa/messagebus/testlib/simpleprotocol.h>
#include <vespa/messagebus/testlib/simplemessage.h>
#include <vespa/messagebus/testlib/simplereply.h>
#include <vespa/messagebus/testlib/slobrok.h>
#include <vespa/messagebus/testlib/testserver.h>
-#include <vespa/log/log.h>
-
-LOG_SETUP("simpleprotocol_test");
+#include <vespa/messagebus/errorcode.h>
+#include <vespa/messagebus/ireplyhandler.h>
+#include <vespa/messagebus/network/identity.h>
+#include <vespa/messagebus/routing/routingcontext.h>
+#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/vespalib/component/vtag.h>
using namespace mbus;
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>
diff --git a/messagebus/src/vespa/messagebus/dynamicthrottlepolicy.h b/messagebus/src/vespa/messagebus/dynamicthrottlepolicy.h
index d552c3c48e9..ff49f15b416 100644
--- a/messagebus/src/vespa/messagebus/dynamicthrottlepolicy.h
+++ b/messagebus/src/vespa/messagebus/dynamicthrottlepolicy.h
@@ -164,13 +164,8 @@ public:
*/
uint32_t getMaxPendingCount() const { return (uint32_t)_windowSize; }
- // Implements IThrottlePolicy.
bool canSend(const Message &msg, uint32_t pendingCount) override;
-
- // Implements IThrottlePolicy.
void processMessage(Message &msg) override;
-
- // Implements IThrottlePolicy.
void processReply(Reply &reply) override;
};
diff --git a/messagebus/src/vespa/messagebus/emptyreply.h b/messagebus/src/vespa/messagebus/emptyreply.h
index f2d431c8ada..db8beb33b9b 100644
--- a/messagebus/src/vespa/messagebus/emptyreply.h
+++ b/messagebus/src/vespa/messagebus/emptyreply.h
@@ -26,24 +26,23 @@ public:
*
* @return ""
*/
- virtual const string & getProtocol() const override;
+ const string & getProtocol() const override;
/**
* This method returns the message type id reserved for empty replies: 0
*
* @return 0
*/
- virtual uint32_t getType() const override;
+ uint32_t getType() const override;
/**
* Encodes this reply into an empty blob.
*
* @return empty blob
*/
- virtual Blob encode() const;
+ Blob encode() const;
uint8_t priority() const override { return 8; }
};
} // namespace mbus
-
diff --git a/messagebus/src/vespa/messagebus/error.h b/messagebus/src/vespa/messagebus/error.h
index d67442c054c..e3d62bf6bbe 100644
--- a/messagebus/src/vespa/messagebus/error.h
+++ b/messagebus/src/vespa/messagebus/error.h
@@ -1,7 +1,6 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <stdint.h>
#include <vespa/messagebus/common.h>
#ifdef Error
diff --git a/messagebus/src/vespa/messagebus/errorcode.h b/messagebus/src/vespa/messagebus/errorcode.h
index 7667c75725e..a452329a341 100644
--- a/messagebus/src/vespa/messagebus/errorcode.h
+++ b/messagebus/src/vespa/messagebus/errorcode.h
@@ -2,7 +2,6 @@
#pragma once
-#include <stdint.h>
#include <vespa/messagebus/common.h>
namespace mbus {
diff --git a/messagebus/src/vespa/messagebus/intermediatesession.h b/messagebus/src/vespa/messagebus/intermediatesession.h
index 064b223707f..b4832d5069a 100644
--- a/messagebus/src/vespa/messagebus/intermediatesession.h
+++ b/messagebus/src/vespa/messagebus/intermediatesession.h
@@ -87,10 +87,7 @@ public:
*/
const string getConnectionSpec() const;
- // Implements IMessageHandler.
void handleMessage(Message::UP message) override;
-
- // Implements IReplyHandler.
void handleReply(Reply::UP reply) override;
};
diff --git a/messagebus/src/vespa/messagebus/message.h b/messagebus/src/vespa/messagebus/message.h
index 6fc72af0055..cea0aaa91fb 100644
--- a/messagebus/src/vespa/messagebus/message.h
+++ b/messagebus/src/vespa/messagebus/message.h
@@ -35,10 +35,9 @@ public:
* will log an error and generate an auto-reply to avoid having the sender
* wait indefinetly for a reply.
*/
- virtual ~Message();
+ ~Message();
- // Overrides Routable.
- virtual void swapState(Routable &rhs) override;
+ void swapState(Routable &rhs) override;
/**
* Returns the timestamp for when this message was last seen by message
@@ -139,7 +138,7 @@ public:
*
* @return false
*/
- virtual bool isReply() const override { return false; }
+ bool isReply() const override { return false; }
/**
* Returns whether or not this message contains a sequence identifier that
diff --git a/messagebus/src/vespa/messagebus/messenger.h b/messagebus/src/vespa/messagebus/messenger.h
index fe76513eef9..70207029e19 100644
--- a/messagebus/src/vespa/messagebus/messenger.h
+++ b/messagebus/src/vespa/messagebus/messenger.h
@@ -47,7 +47,6 @@ private:
bool _closed;
protected:
- // Implements FastOS_Runnable.
void Run(FastOS_ThreadInterface *thread, void *arg) override;
public:
diff --git a/messagebus/src/vespa/messagebus/reply.h b/messagebus/src/vespa/messagebus/reply.h
index 8bc4f5921e0..f352d442931 100644
--- a/messagebus/src/vespa/messagebus/reply.h
+++ b/messagebus/src/vespa/messagebus/reply.h
@@ -39,17 +39,10 @@ public:
* will log an error and generate an auto-reply to avoid having the sender
* wait indefinetly for a reply.
*/
- virtual ~Reply();
+ ~Reply();
- // Inherit doc from Routable.
- virtual void swapState(Routable &rhs) override;
-
- /**
- * Inherited from Routable. Classifies this object as 'a reply'.
- *
- * @return true
- */
- virtual bool isReply() const override;
+ void swapState(Routable &rhs) override;
+ bool isReply() const override;
/**
* Add an Error to this Reply
diff --git a/messagebus/src/vespa/messagebus/routablequeue.h b/messagebus/src/vespa/messagebus/routablequeue.h
index ea2b14b64f6..acb99d7269a 100644
--- a/messagebus/src/vespa/messagebus/routablequeue.h
+++ b/messagebus/src/vespa/messagebus/routablequeue.h
@@ -76,14 +76,14 @@ public:
*
* @param msg the Message to handle
**/
- virtual void handleMessage(Message::UP msg) override;
+ void handleMessage(Message::UP msg) override;
/**
* Handle a Reply by enqueuing it.
*
* @param reply the Reply to handle
**/
- virtual void handleReply(Reply::UP reply) override;
+ void handleReply(Reply::UP reply) override;
};
} // namespace mbus
diff --git a/messagebus/src/vespa/messagebus/routing/errordirective.cpp b/messagebus/src/vespa/messagebus/routing/errordirective.cpp
index 2cc5d5da392..6bfbf6fad30 100644
--- a/messagebus/src/vespa/messagebus/routing/errordirective.cpp
+++ b/messagebus/src/vespa/messagebus/routing/errordirective.cpp
@@ -11,13 +11,13 @@ ErrorDirective::ErrorDirective(const vespalib::stringref &msg) :
string
ErrorDirective::toString() const
{
- return vespalib::make_vespa_string("(%s)", _msg.c_str());
+ return vespalib::make_string("(%s)", _msg.c_str());
}
string
ErrorDirective::toDebugString() const
{
- return vespalib::make_vespa_string("ErrorDirective(msg = '%s')", _msg.c_str());
+ return vespalib::make_string("ErrorDirective(msg = '%s')", _msg.c_str());
}
} // mbus
diff --git a/messagebus/src/vespa/messagebus/sendproxy.h b/messagebus/src/vespa/messagebus/sendproxy.h
index ca0c3f39661..e0212c4c222 100644
--- a/messagebus/src/vespa/messagebus/sendproxy.h
+++ b/messagebus/src/vespa/messagebus/sendproxy.h
@@ -34,13 +34,8 @@ public:
*/
SendProxy(MessageBus &mbus, INetwork &net, Resender *resender);
- // Implements IDiscardHandler.
void handleDiscard(Context ctx) override;
-
- // Implements IMessageHandler.
void handleMessage(Message::UP msg) override;
-
- // Implements IReplyHandler.
void handleReply(Reply::UP reply) override;
};
diff --git a/messagebus/src/vespa/messagebus/staticthrottlepolicy.h b/messagebus/src/vespa/messagebus/staticthrottlepolicy.h
index b7cc6bdfe99..586451ea83a 100644
--- a/messagebus/src/vespa/messagebus/staticthrottlepolicy.h
+++ b/messagebus/src/vespa/messagebus/staticthrottlepolicy.h
@@ -70,13 +70,8 @@ public:
*/
uint64_t getPendingSize() const;
- // Implements IThrottlePolicy.
bool canSend(const Message &msg, uint32_t pendingCount) override;
-
- // Implements IThrottlePolicy.
void processMessage(Message &msg) override;
-
- // Implements IThrottlePolicy.
void processReply(Reply &reply) override;
};
diff --git a/messagebus/src/vespa/messagebus/systemtimer.h b/messagebus/src/vespa/messagebus/systemtimer.h
index 14156253067..4a83add0732 100644
--- a/messagebus/src/vespa/messagebus/systemtimer.h
+++ b/messagebus/src/vespa/messagebus/systemtimer.h
@@ -12,7 +12,6 @@ namespace mbus {
*/
class SystemTimer : public ITimer {
public:
- // Implements ITimer.
uint64_t getMilliTime() const override;
};
diff --git a/messagebus/src/vespa/messagebus/testlib/custompolicy.h b/messagebus/src/vespa/messagebus/testlib/custompolicy.h
index 953f4f3c92e..4fec4efe7c2 100644
--- a/messagebus/src/vespa/messagebus/testlib/custompolicy.h
+++ b/messagebus/src/vespa/messagebus/testlib/custompolicy.h
@@ -1,8 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/messagebus/routing/iroutingpolicy.h>
#include "simpleprotocol.h"
+#include <vespa/messagebus/routing/iroutingpolicy.h>
namespace mbus {
@@ -17,8 +17,8 @@ public:
const std::vector<uint32_t> consumableErrors,
const std::vector<Route> &routes);
- virtual void select(RoutingContext &context) override;
- virtual void merge(RoutingContext &context) override;
+ void select(RoutingContext &context) override;
+ void merge(RoutingContext &context) override;
};
class CustomPolicyFactory : public SimpleProtocol::IPolicyFactory {
@@ -37,4 +37,3 @@ public:
};
} // namespace mbus
-
diff --git a/messagebus/src/vespa/messagebus/testlib/receptor.h b/messagebus/src/vespa/messagebus/testlib/receptor.h
index c64e60eb6de..2e9a424b481 100644
--- a/messagebus/src/vespa/messagebus/testlib/receptor.h
+++ b/messagebus/src/vespa/messagebus/testlib/receptor.h
@@ -20,11 +20,10 @@ private:
Receptor &operator=(const Receptor &);
public:
Receptor();
- virtual void handleMessage(Message::UP msg) override;
- virtual void handleReply(Reply::UP reply) override;
+ void handleMessage(Message::UP msg) override;
+ void handleReply(Reply::UP reply) override;
Message::UP getMessage(double maxWait = 120.0);
Reply::UP getReply(double maxWait = 120.0);
};
} // namespace mbus
-
diff --git a/messagebus/src/vespa/messagebus/testlib/simplemessage.h b/messagebus/src/vespa/messagebus/testlib/simplemessage.h
index cb14c48dd9f..aeee34045ff 100644
--- a/messagebus/src/vespa/messagebus/testlib/simplemessage.h
+++ b/messagebus/src/vespa/messagebus/testlib/simplemessage.h
@@ -8,9 +8,9 @@ namespace mbus {
class SimpleMessage : public Message {
private:
- string _value;
- bool _hasSeqId;
- uint64_t _seqId;
+ string _value;
+ bool _hasSeqId;
+ uint64_t _seqId;
public:
SimpleMessage(const string &str);
@@ -25,9 +25,7 @@ public:
bool hasSequenceId() const override;
uint64_t getSequenceId() const override;
uint32_t getApproxSize() const override;
-
uint8_t priority() const override { return 8; }
-
string toString() const override { return _value; }
};
diff --git a/messagebus/src/vespa/messagebus/testlib/simpleprotocol.h b/messagebus/src/vespa/messagebus/testlib/simpleprotocol.h
index 843b7675b96..0551d177898 100644
--- a/messagebus/src/vespa/messagebus/testlib/simpleprotocol.h
+++ b/messagebus/src/vespa/messagebus/testlib/simpleprotocol.h
@@ -2,9 +2,8 @@
#pragma once
-#include <map>
-#include <string>
#include <vespa/messagebus/iprotocol.h>
+#include <map>
namespace mbus {
@@ -49,10 +48,7 @@ public:
*/
SimpleProtocol();
- /**
- * Frees up any allocated resources.
- */
- virtual ~SimpleProtocol();
+ ~SimpleProtocol();
/**
* Registers a policy factory with this protocol under a given name. Whenever a policy is requested that
@@ -72,19 +68,10 @@ public:
*/
static void simpleMerge(RoutingContext &ctx);
- // Implements IProtocol.
const string & getName() const override;
-
- // Implements IProtocol.
- IRoutingPolicy::UP createPolicy(const string &name,
- const string &param) const override;
-
- // Implements IProtocol.
+ IRoutingPolicy::UP createPolicy(const string &name, const string &param) const override;
Blob encode(const vespalib::Version &version, const Routable &routable) const override;
-
- // Implements IProtocol.
Routable::UP decode(const vespalib::Version &version, BlobRef data) const override;
};
} // namespace mbus
-
diff --git a/messagebus/src/vespa/messagebus/testlib/simplereply.h b/messagebus/src/vespa/messagebus/testlib/simplereply.h
index 8016a517453..3b9ac7fe21e 100644
--- a/messagebus/src/vespa/messagebus/testlib/simplereply.h
+++ b/messagebus/src/vespa/messagebus/testlib/simplereply.h
@@ -2,9 +2,8 @@
#pragma once
-#include <string>
-#include <vespa/messagebus/reply.h>
#include "simplemessage.h"
+#include <vespa/messagebus/reply.h>
namespace mbus {
@@ -19,11 +18,10 @@ public:
virtual ~SimpleReply();
void setValue(const string &value);
const string &getValue() const;
- virtual const string & getProtocol() const override;
- virtual uint32_t getType() const override;
+ const string & getProtocol() const override;
+ uint32_t getType() const override;
uint8_t priority() const override { return 8; }
};
} // namespace mbus
-
diff --git a/messagebus/src/vespa/messagebus/testlib/slobrok.cpp b/messagebus/src/vespa/messagebus/testlib/slobrok.cpp
index b3f02b1ad58..fa71cb9f9ad 100644
--- a/messagebus/src/vespa/messagebus/testlib/slobrok.cpp
+++ b/messagebus/src/vespa/messagebus/testlib/slobrok.cpp
@@ -20,7 +20,8 @@ public:
guard.wait();
}
}
- virtual void PerformTask() override {
+
+ void PerformTask() override {
vespalib::MonitorGuard guard(_mon);
_done = true;
guard.signal();
diff --git a/messagebus/src/vespa/messagebus/testlib/slobrok.h b/messagebus/src/vespa/messagebus/testlib/slobrok.h
index 2f8d4180ba5..1677f6635f7 100644
--- a/messagebus/src/vespa/messagebus/testlib/slobrok.h
+++ b/messagebus/src/vespa/messagebus/testlib/slobrok.h
@@ -2,7 +2,6 @@
#pragma once
-#include <memory>
#include <vespa/messagebus/common.h>
#include <vespa/slobrok/cfg.h>
diff --git a/vdslib/src/tests/bucketdistribution/bucketdistributiontest.cpp b/vdslib/src/tests/bucketdistribution/bucketdistributiontest.cpp
index 589d7b66e96..89879ef9d7a 100644
--- a/vdslib/src/tests/bucketdistribution/bucketdistributiontest.cpp
+++ b/vdslib/src/tests/bucketdistribution/bucketdistributiontest.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(".bucketdistributiontest");
#include <cppunit/extensions/HelperMacros.h>
#include <vespa/vdslib/bucketdistribution.h>
@@ -10,8 +7,6 @@ using namespace vdslib;
class BucketDistributionTest : public CppUnit::TestFixture {
public:
- void setUp() override { }
- void tearDown() override { }
void testDistribution();
void testNumBucketBits();
@@ -29,7 +24,6 @@ CPPUNIT_TEST_SUITE_REGISTRATION(BucketDistributionTest);
void BucketDistributionTest::testDistribution()
{
- LOG(info, "testDistribution");
const uint32_t expected4[] = {
10, 11, 9, 6, 4, 8, 14, 1, 13, 2, 12, 3, 5, 7, 15, 0 };
assertDistribution(16, 4, expected4);
diff --git a/vdslib/src/tests/container/documentlisttest.cpp b/vdslib/src/tests/container/documentlisttest.cpp
index 2c72e29787e..5120c4efa05 100644
--- a/vdslib/src/tests/container/documentlisttest.cpp
+++ b/vdslib/src/tests/container/documentlisttest.cpp
@@ -1,20 +1,13 @@
// 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/vdslib/container/writabledocumentlist.h>
-
-#include <cppunit/extensions/HelperMacros.h>
#include <vespa/document/base/testdocman.h>
-#include <vespa/document/config/config-documenttypes.h>
-#include <vespa/document/fieldvalue/document.h>
-#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/update/assignvalueupdate.h>
#include <vespa/document/update/documentupdate.h>
#include <vespa/vespalib/objects/nbostream.h>
#include <vespa/vespalib/util/random.h>
#include <vespa/vespalib/testkit/testapp.h>
-#include <vespa/vespalib/util/vstringfmt.h>
-#include <iostream>
+#include <cppunit/extensions/HelperMacros.h>
using document::DocumentTypeRepo;
using document::readDocumenttypesConfig;
@@ -522,14 +515,14 @@ void WritableDocumentListTest::testOperationList()
for (uint32_t i=0; i<3000; ++i, it++) {
CPPUNIT_ASSERT_EQUAL(
- vespalib::make_vespa_string("userdoc:test:1298798789:%d", i),
+ vespalib::make_string("userdoc:test:1298798789:%d", i),
it->getDocument()->getId().toString());
CPPUNIT_ASSERT(!it->isRemoveEntry());
}
for (uint32_t i=5000; i<5900; ++i, it++) {
CPPUNIT_ASSERT_EQUAL(
- vespalib::make_vespa_string("userdoc:test:1298798789:%d", i),
+ vespalib::make_string("userdoc:test:1298798789:%d", i),
it->getDocument()->getId().toString());
CPPUNIT_ASSERT(it->isRemoveEntry());
}
diff --git a/vdslib/src/tests/container/documentsummarytest.cpp b/vdslib/src/tests/container/documentsummarytest.cpp
index 80547e28d1f..86684420278 100644
--- a/vdslib/src/tests/container/documentsummarytest.cpp
+++ b/vdslib/src/tests/container/documentsummarytest.cpp
@@ -1,9 +1,8 @@
// 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 <cppunit/extensions/HelperMacros.h>
#include <vespa/document/base/testdocman.h>
#include <vespa/vdslib/container/documentsummary.h>
+#include <cppunit/extensions/HelperMacros.h>
namespace vdslib {
diff --git a/vdslib/src/tests/container/parameterstest.cpp b/vdslib/src/tests/container/parameterstest.cpp
index 63ab18bcd26..4e34e48eef0 100644
--- a/vdslib/src/tests/container/parameterstest.cpp
+++ b/vdslib/src/tests/container/parameterstest.cpp
@@ -1,9 +1,8 @@
// 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 <cppunit/extensions/HelperMacros.h>
#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/vdslib/container/parameters.h>
+#include <cppunit/extensions/HelperMacros.h>
using document::DocumentTypeRepo;
using namespace vdslib;
diff --git a/vdslib/src/tests/container/searchresulttest.cpp b/vdslib/src/tests/container/searchresulttest.cpp
index b72df61c2dd..d26424dba06 100644
--- a/vdslib/src/tests/container/searchresulttest.cpp
+++ b/vdslib/src/tests/container/searchresulttest.cpp
@@ -1,9 +1,8 @@
// 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 <cppunit/extensions/HelperMacros.h>
#include <vespa/document/base/testdocman.h>
#include <vespa/vdslib/container/searchresult.h>
+#include <cppunit/extensions/HelperMacros.h>
namespace vdslib {
diff --git a/vdslib/src/tests/distribution/bucketvector.cpp b/vdslib/src/tests/distribution/bucketvector.cpp
index 789f85aa034..9cda8741f42 100644
--- a/vdslib/src/tests/distribution/bucketvector.cpp
+++ b/vdslib/src/tests/distribution/bucketvector.cpp
@@ -1,11 +1,8 @@
// 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 <tests/distribution/bucketvector.h>
+#include "bucketvector.h"
#include <limits>
#include <iostream>
#include <algorithm>
-#include <vespa/document/bucket/bucketid.h>
-
namespace BucketVector{
diff --git a/vdslib/src/tests/distribution/bucketvector.h b/vdslib/src/tests/distribution/bucketvector.h
index b9499de933a..9515ab85fb9 100644
--- a/vdslib/src/tests/distribution/bucketvector.h
+++ b/vdslib/src/tests/distribution/bucketvector.h
@@ -4,7 +4,6 @@
#include <vector>
#include <vespa/document/bucket/bucketid.h>
-
namespace BucketVector{
void reserve(size_t capacity);
@@ -13,4 +12,3 @@ namespace BucketVector{
void getBuckets(uint32_t distributionBits, std::vector<document::BucketId>& buckets);
void printVector();
}
-
diff --git a/vdslib/src/tests/distribution/datadistributiontest.cpp b/vdslib/src/tests/distribution/datadistributiontest.cpp
index f81e0992756..e87d7b9754f 100644
--- a/vdslib/src/tests/distribution/datadistributiontest.cpp
+++ b/vdslib/src/tests/distribution/datadistributiontest.cpp
@@ -1,15 +1,16 @@
// 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 <cppunit/extensions/HelperMacros.h>
-#include <list>
-#include <vespa/document/bucket/bucketidfactory.h>
+#include "bucketvector.h"
+#include "randombucket.h"
#include <vespa/vdslib/distribution/distribution.h>
#include <vespa/vdslib/state/clusterstate.h>
#include <vespa/vdslib/state/random.h>
-#include <ctime>
-#include <tests/distribution/bucketvector.h>
-#include <tests/distribution/randombucket.h>
+#include <vespa/document/bucket/bucketidfactory.h>
+#include <cppunit/extensions/HelperMacros.h>
#include <fstream>
+#include <list>
+#include <ctime>
+
+
using std::cout;
using std::ios;
diff --git a/vdslib/src/tests/distribution/grouptest.cpp b/vdslib/src/tests/distribution/grouptest.cpp
index b182c19d072..db9cd69dad6 100644
--- a/vdslib/src/tests/distribution/grouptest.cpp
+++ b/vdslib/src/tests/distribution/grouptest.cpp
@@ -1,8 +1,6 @@
// 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/vdslib/distribution/group.h>
-
#include <vespa/vespalib/text/stringtokenizer.h>
#include <vespa/vdstestlib/cppunit/macros.h>
diff --git a/vdslib/src/tests/distribution/randombucket.cpp b/vdslib/src/tests/distribution/randombucket.cpp
index 57b6798068e..ab0f474b75e 100644
--- a/vdslib/src/tests/distribution/randombucket.cpp
+++ b/vdslib/src/tests/distribution/randombucket.cpp
@@ -1,8 +1,7 @@
// 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 "randombucket.h"
#include <vespa/vdslib/state/random.h>
-#include <tests/distribution/randombucket.h>
-#include <iostream>
namespace RandomBucket{
diff --git a/vdslib/src/tests/distribution/randombucket.h b/vdslib/src/tests/distribution/randombucket.h
index fcede950c52..6e8d4b7ddc6 100644
--- a/vdslib/src/tests/distribution/randombucket.h
+++ b/vdslib/src/tests/distribution/randombucket.h
@@ -1,4 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
#pragma once
namespace RandomBucket{
@@ -8,4 +9,3 @@ namespace RandomBucket{
uint64_t get();
void setSeed(int seed=-1);
}
-
diff --git a/vdslib/src/tests/state/grouptest.cpp b/vdslib/src/tests/state/grouptest.cpp
index c61f1e37bb9..f79f040f2b7 100644
--- a/vdslib/src/tests/state/grouptest.cpp
+++ b/vdslib/src/tests/state/grouptest.cpp
@@ -1,12 +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 <boost/lexical_cast.hpp>
-#include <cppunit/extensions/HelperMacros.h>
#include <vespa/vdslib/state/nodetype.h>
#include <vdslib/state/group.h>
#include <vespa/vdslib/state/idealgroup.h>
#include <vespa/vespalib/util/exceptions.h>
-#include <iostream>
+#include <cppunit/extensions/HelperMacros.h>
+#include <boost/lexical_cast.hpp>
#include <algorithm>
using namespace std;
diff --git a/vdslib/src/tests/state/nodestatetest.cpp b/vdslib/src/tests/state/nodestatetest.cpp
index e479dc70013..2d87495de7f 100644
--- a/vdslib/src/tests/state/nodestatetest.cpp
+++ b/vdslib/src/tests/state/nodestatetest.cpp
@@ -1,8 +1,7 @@
// 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 <cppunit/extensions/HelperMacros.h>
+
#include <vespa/vdslib/state/nodestate.h>
-#include <iostream>
+#include <cppunit/extensions/HelperMacros.h>
namespace storage {
namespace lib {
diff --git a/vdslib/src/tests/testrunner.cpp b/vdslib/src/tests/testrunner.cpp
index fef61af9a17..0c5dcd1d00a 100644
--- a/vdslib/src/tests/testrunner.cpp
+++ b/vdslib/src/tests/testrunner.cpp
@@ -1,13 +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>
#include <vespa/vdstestlib/cppunit/cppunittestrunner.h>
+#include <vespa/log/log.h>
LOG_SETUP("vdslibcppunittestrunner");
int
-main(int argc, char **argv)
+main(int argc, const char *argv[])
{
vdstestlib::CppUnitTestRunner testRunner;
return testRunner.run(argc, argv);
diff --git a/vdslib/src/tests/thread/taskschedulertest.cpp b/vdslib/src/tests/thread/taskschedulertest.cpp
index 22529a9f37a..a48f9d20214 100644
--- a/vdslib/src/tests/thread/taskschedulertest.cpp
+++ b/vdslib/src/tests/thread/taskschedulertest.cpp
@@ -1,6 +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/vdslib/thread/taskscheduler.h>
#include <vespa/vdstestlib/cppunit/macros.h>