summaryrefslogtreecommitdiffstats
path: root/storage/src/tests
diff options
context:
space:
mode:
authorArne H Juul <arnej27959@users.noreply.github.com>2017-04-24 12:10:42 +0200
committerGitHub <noreply@github.com>2017-04-24 12:10:42 +0200
commit9ff4bdb407ed8d855a3f86a17c99906ff738177b (patch)
treefc2b050224d7dde92d57e1f9cac12c1e5aaf6b90 /storage/src/tests
parent32ae190acc9ac5081049e1c7008d1602c68cf821 (diff)
Revert "Balder/enforce override 2"
Diffstat (limited to 'storage/src/tests')
-rw-r--r--storage/src/tests/bucketdb/initializertest.cpp3
-rw-r--r--storage/src/tests/bucketmover/bucketmovertest.cpp1
-rw-r--r--storage/src/tests/common/metricstest.cpp6
-rw-r--r--storage/src/tests/distributor/blockingoperationstartertest.cpp4
-rw-r--r--storage/src/tests/distributor/bucketdatabasetest.cpp3
-rw-r--r--storage/src/tests/distributor/bucketdbupdatertest.cpp1
-rw-r--r--storage/src/tests/distributor/bucketstateoperationtest.cpp7
-rw-r--r--storage/src/tests/distributor/distributor_host_info_reporter_test.cpp1
-rw-r--r--storage/src/tests/distributor/distributortest.cpp3
-rw-r--r--storage/src/tests/distributor/idealstatemanagertest.cpp1
-rw-r--r--storage/src/tests/distributor/mapbucketdatabasetest.cpp7
-rw-r--r--storage/src/tests/distributor/mergeoperationtest.cpp1
-rw-r--r--storage/src/tests/distributor/messagesenderstub.h8
-rw-r--r--storage/src/tests/distributor/operationtargetresolvertest.cpp2
-rw-r--r--storage/src/tests/distributor/pendingmessagetrackertest.cpp8
-rw-r--r--storage/src/tests/distributor/simplemaintenancescannertest.cpp7
-rw-r--r--storage/src/tests/distributor/statusreporterdelegatetest.cpp2
-rw-r--r--storage/src/tests/distributor/throttlingoperationstartertest.cpp4
-rw-r--r--storage/src/tests/frameworkimpl/status/statustest.cpp25
-rw-r--r--storage/src/tests/persistence/bucketownershipnotifiertest.cpp1
-rw-r--r--storage/src/tests/persistence/filestorage/filestormanagertest.cpp22
-rw-r--r--storage/src/tests/persistence/filestorage/filestormodifiedbucketstest.cpp3
-rw-r--r--storage/src/tests/persistence/filestorage/modifiedbucketcheckertest.cpp3
-rw-r--r--storage/src/tests/persistence/legacyoperationhandlertest.cpp3
-rw-r--r--storage/src/tests/persistence/mergehandlertest.cpp4
-rw-r--r--storage/src/tests/persistence/providershutdownwrappertest.cpp2
-rw-r--r--storage/src/tests/storageserver/bouncertest.cpp3
-rw-r--r--storage/src/tests/storageserver/bucketintegritycheckertest.cpp4
-rw-r--r--storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp2
-rw-r--r--storage/src/tests/storageserver/priorityconvertertest.cpp1
-rw-r--r--storage/src/tests/storageserver/statemanagertest.cpp8
-rw-r--r--storage/src/tests/storageserver/statereportertest.cpp10
-rw-r--r--storage/src/tests/storageutil/charttest.cpp7
-rw-r--r--storage/src/tests/storageutil/palettetest.cpp4
-rw-r--r--storage/src/tests/testrunner.cpp6
-rw-r--r--storage/src/tests/visiting/visitormanagertest.cpp11
-rw-r--r--storage/src/tests/visiting/visitortest.cpp10
37 files changed, 164 insertions, 34 deletions
diff --git a/storage/src/tests/bucketdb/initializertest.cpp b/storage/src/tests/bucketdb/initializertest.cpp
index 47e80f0c202..9aa7da92e36 100644
--- a/storage/src/tests/bucketdb/initializertest.cpp
+++ b/storage/src/tests/bucketdb/initializertest.cpp
@@ -423,8 +423,7 @@ struct FakePersistenceLayer : public StorageLink {
}
return 0;
}
-
- bool onDown(const api::StorageMessage::SP& msg) override {
+ virtual bool onDown(const api::StorageMessage::SP& msg) override {
fatalError = "";
if (messageCallback) {
messageCallback->onMessage(*msg);
diff --git a/storage/src/tests/bucketmover/bucketmovertest.cpp b/storage/src/tests/bucketmover/bucketmovertest.cpp
index c233765ad27..3a844b6d1d8 100644
--- a/storage/src/tests/bucketmover/bucketmovertest.cpp
+++ b/storage/src/tests/bucketmover/bucketmovertest.cpp
@@ -1,5 +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/storage/bucketdb/storbucketdb.h>
#include <vespa/storage/common/bucketmessages.h>
#include <vespa/storage/bucketmover/bucketmover.h>
diff --git a/storage/src/tests/common/metricstest.cpp b/storage/src/tests/common/metricstest.cpp
index 15f0373e680..8dea2fad94f 100644
--- a/storage/src/tests/common/metricstest.cpp
+++ b/storage/src/tests/common/metricstest.cpp
@@ -67,8 +67,10 @@ namespace {
{
framework::Clock& _clock;
MetricClock(framework::Clock& c) : _clock(c) {}
- time_t getTime() const override { return _clock.getTimeInSeconds().getTime(); }
- time_t getTimeInMilliSecs() const override { return _clock.getTimeInMillis().getTime(); }
+ virtual time_t getTime() const override
+ { return _clock.getTimeInSeconds().getTime(); }
+ virtual time_t getTimeInMilliSecs() const override
+ { return _clock.getTimeInMillis().getTime(); }
};
}
diff --git a/storage/src/tests/distributor/blockingoperationstartertest.cpp b/storage/src/tests/distributor/blockingoperationstartertest.cpp
index 64f3dae8fbe..2ae8a819d7e 100644
--- a/storage/src/tests/distributor/blockingoperationstartertest.cpp
+++ b/storage/src/tests/distributor/blockingoperationstartertest.cpp
@@ -1,5 +1,9 @@
// 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/vdstestlib/cppunit/macros.h>
+#include <string>
+#include <sstream>
+#include <memory>
#include <vespa/storage/frameworkimpl/component/storagecomponentregisterimpl.h>
#include <vespa/storage/distributor/blockingoperationstarter.h>
#include <vespa/storage/distributor/pendingmessagetracker.h>
diff --git a/storage/src/tests/distributor/bucketdatabasetest.cpp b/storage/src/tests/distributor/bucketdatabasetest.cpp
index 5d1bb17a1c6..13a8aff239c 100644
--- a/storage/src/tests/distributor/bucketdatabasetest.cpp
+++ b/storage/src/tests/distributor/bucketdatabasetest.cpp
@@ -1,6 +1,9 @@
// 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/distributor/bucketdatabasetest.h>
#include <vespa/storageframework/defaultimplementation/clock/realclock.h>
+#include <iostream>
+#include <fstream>
#include <iomanip>
namespace storage {
diff --git a/storage/src/tests/distributor/bucketdbupdatertest.cpp b/storage/src/tests/distributor/bucketdbupdatertest.cpp
index e35f147d0c8..7ad083dc5a1 100644
--- a/storage/src/tests/distributor/bucketdbupdatertest.cpp
+++ b/storage/src/tests/distributor/bucketdbupdatertest.cpp
@@ -13,6 +13,7 @@
#include <iostream>
#include <fstream>
+#include <string>
using namespace storage::api;
using namespace storage::lib;
diff --git a/storage/src/tests/distributor/bucketstateoperationtest.cpp b/storage/src/tests/distributor/bucketstateoperationtest.cpp
index 58061def8ab..74a31de1541 100644
--- a/storage/src/tests/distributor/bucketstateoperationtest.cpp
+++ b/storage/src/tests/distributor/bucketstateoperationtest.cpp
@@ -28,10 +28,13 @@ private:
void testBucketDbNotUpdatedOnFailure();
public:
- void setUp() override {
+ void setUp() override
+ {
createLinks();
}
- void tearDown() override {
+
+ void tearDown() override
+ {
close();
}
};
diff --git a/storage/src/tests/distributor/distributor_host_info_reporter_test.cpp b/storage/src/tests/distributor/distributor_host_info_reporter_test.cpp
index 3e4e1d6da88..e7078f08d0a 100644
--- a/storage/src/tests/distributor/distributor_host_info_reporter_test.cpp
+++ b/storage/src/tests/distributor/distributor_host_info_reporter_test.cpp
@@ -6,6 +6,7 @@
#include <vespa/storage/distributor/min_replica_provider.h>
#include <vespa/vespalib/data/slime/slime.h>
#include <vespa/vespalib/io/fileutil.h>
+#include <vespa/vespalib/util/jsonstream.h>
#include <vespa/vespalib/testkit/test_kit.h>
#include <tests/common/hostreporter/util.h>
#include <vespa/vespalib/stllike/asciistream.h>
diff --git a/storage/src/tests/distributor/distributortest.cpp b/storage/src/tests/distributor/distributortest.cpp
index 10b0d035770..fc09dc17c1f 100644
--- a/storage/src/tests/distributor/distributortest.cpp
+++ b/storage/src/tests/distributor/distributortest.cpp
@@ -1,5 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <iomanip>
+#include <iostream>
+#include <memory>
#include <boost/assign/std/vector.hpp> // for 'operator+=()'
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/storage/distributor/idealstatemetricsset.h>
diff --git a/storage/src/tests/distributor/idealstatemanagertest.cpp b/storage/src/tests/distributor/idealstatemanagertest.cpp
index e4fce6b9d6e..2b861d23c5e 100644
--- a/storage/src/tests/distributor/idealstatemanagertest.cpp
+++ b/storage/src/tests/distributor/idealstatemanagertest.cpp
@@ -11,6 +11,7 @@
#include <tests/distributor/distributortestutil.h>
+
namespace storage {
namespace distributor {
diff --git a/storage/src/tests/distributor/mapbucketdatabasetest.cpp b/storage/src/tests/distributor/mapbucketdatabasetest.cpp
index 8af2a86e4c5..6892f522bba 100644
--- a/storage/src/tests/distributor/mapbucketdatabasetest.cpp
+++ b/storage/src/tests/distributor/mapbucketdatabasetest.cpp
@@ -1,6 +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/vespalib/util/document_runnable.h>
#include <vespa/vdstestlib/cppunit/macros.h>
+#include <cppunit/extensions/HelperMacros.h>
#include <vespa/storage/bucketdb/mapbucketdatabase.h>
+#include <vespa/storage/storageutil/utils.h>
#include <tests/distributor/bucketdatabasetest.h>
namespace storage {
@@ -8,7 +12,8 @@ namespace distributor {
struct MapBucketDatabaseTest : public BucketDatabaseTest {
MapBucketDatabase _db;
- BucketDatabase& db() override { return _db; };
+
+ virtual BucketDatabase& db() override { return _db; }
CPPUNIT_TEST_SUITE(MapBucketDatabaseTest);
SETUP_DATABASE_TESTS();
diff --git a/storage/src/tests/distributor/mergeoperationtest.cpp b/storage/src/tests/distributor/mergeoperationtest.cpp
index 1e317e20b74..875d16a42ed 100644
--- a/storage/src/tests/distributor/mergeoperationtest.cpp
+++ b/storage/src/tests/distributor/mergeoperationtest.cpp
@@ -1,4 +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 <boost/lexical_cast.hpp>
#include <cppunit/extensions/HelperMacros.h>
#include <iomanip>
diff --git a/storage/src/tests/distributor/messagesenderstub.h b/storage/src/tests/distributor/messagesenderstub.h
index 629c1c6e346..7b552ec6883 100644
--- a/storage/src/tests/distributor/messagesenderstub.h
+++ b/storage/src/tests/distributor/messagesenderstub.h
@@ -2,7 +2,6 @@
#pragma once
#include <vespa/storage/distributor/distributormessagesender.h>
-#include <cassert>
namespace storage {
@@ -21,11 +20,13 @@ struct MessageSenderStub : distributor::DistributorMessageSender
replies.clear();
}
- virtual void sendCommand(const std::shared_ptr<api::StorageCommand>& cmd) {
+ virtual void sendCommand(const std::shared_ptr<api::StorageCommand>& cmd)
+ {
commands.push_back(cmd);
}
- virtual void sendReply(const std::shared_ptr<api::StorageReply>& reply) {
+ virtual void sendReply(const std::shared_ptr<api::StorageReply>& reply)
+ {
replies.push_back(reply);
}
@@ -66,3 +67,4 @@ private:
};
}
+
diff --git a/storage/src/tests/distributor/operationtargetresolvertest.cpp b/storage/src/tests/distributor/operationtargetresolvertest.cpp
index d0dc8cedaf3..26144ac950e 100644
--- a/storage/src/tests/distributor/operationtargetresolvertest.cpp
+++ b/storage/src/tests/distributor/operationtargetresolvertest.cpp
@@ -1,5 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <iomanip>
+#include <iostream>
#include <vespa/config/helper/configgetter.h>
#include <vespa/document/config/config-documenttypes.h>
#include <vespa/document/repo/documenttyperepo.h>
diff --git a/storage/src/tests/distributor/pendingmessagetrackertest.cpp b/storage/src/tests/distributor/pendingmessagetrackertest.cpp
index 618d7980c5b..6f4539d426e 100644
--- a/storage/src/tests/distributor/pendingmessagetrackertest.cpp
+++ b/storage/src/tests/distributor/pendingmessagetrackertest.cpp
@@ -1,4 +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/document/base/testdocman.h>
#include <vespa/storage/distributor/pendingmessagetracker.h>
@@ -9,6 +10,13 @@
#include <tests/common/dummystoragelink.h>
#include <vespa/vdslib/state/random.h>
#include <vespa/vdstestlib/cppunit/macros.h>
+#include <fstream>
+#include <sstream>
+#include <iomanip>
+#include <iostream>
+#include <memory>
+#include <string>
+#include <iterator>
namespace storage {
namespace distributor {
diff --git a/storage/src/tests/distributor/simplemaintenancescannertest.cpp b/storage/src/tests/distributor/simplemaintenancescannertest.cpp
index 342d346b398..100d5582006 100644
--- a/storage/src/tests/distributor/simplemaintenancescannertest.cpp
+++ b/storage/src/tests/distributor/simplemaintenancescannertest.cpp
@@ -1,11 +1,18 @@
// 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/vdstestlib/cppunit/macros.h>
#include <vespa/storage/distributor/maintenance/simplemaintenancescanner.h>
#include <vespa/storage/distributor/maintenance/simplebucketprioritydatabase.h>
#include <vespa/storage/bucketdb/mapbucketdatabase.h>
#include <tests/distributor/maintenancemocks.h>
+#include <string>
+#include <sstream>
+#include <memory>
+#include <algorithm>
+#include <iterator>
+
namespace storage {
namespace distributor {
diff --git a/storage/src/tests/distributor/statusreporterdelegatetest.cpp b/storage/src/tests/distributor/statusreporterdelegatetest.cpp
index d9f647a52a5..f136b00244a 100644
--- a/storage/src/tests/distributor/statusreporterdelegatetest.cpp
+++ b/storage/src/tests/distributor/statusreporterdelegatetest.cpp
@@ -1,5 +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/vdstestlib/cppunit/macros.h>
#include <tests/common/testhelper.h>
#include <tests/distributor/distributortestutil.h>
diff --git a/storage/src/tests/distributor/throttlingoperationstartertest.cpp b/storage/src/tests/distributor/throttlingoperationstartertest.cpp
index 0414ad11da4..8e7d98005c1 100644
--- a/storage/src/tests/distributor/throttlingoperationstartertest.cpp
+++ b/storage/src/tests/distributor/throttlingoperationstartertest.cpp
@@ -1,5 +1,9 @@
// 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/vdstestlib/cppunit/macros.h>
+#include <string>
+#include <sstream>
+#include <memory>
#include <vespa/storage/distributor/throttlingoperationstarter.h>
#include <tests/distributor/maintenancemocks.h>
diff --git a/storage/src/tests/frameworkimpl/status/statustest.cpp b/storage/src/tests/frameworkimpl/status/statustest.cpp
index 43d13acb28b..567f9192d34 100644
--- a/storage/src/tests/frameworkimpl/status/statustest.cpp
+++ b/storage/src/tests/frameworkimpl/status/statustest.cpp
@@ -1,12 +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 <vespa/document/util/stringutil.h>
+#include <vespa/log/log.h>
+#include <sstream>
#include <vespa/storageframework/defaultimplementation/component/componentregisterimpl.h>
#include <vespa/storage/frameworkimpl/status/statuswebserver.h>
#include <vespa/storageframework/defaultimplementation/thread/threadpoolimpl.h>
#include <tests/common/teststorageapp.h>
#include <vespa/vdstestlib/cppunit/macros.h>
-#include <vespa/document/util/stringutil.h>
-#include <sstream>
+
+LOG_SETUP(".test.status");
namespace storage {
@@ -43,13 +47,18 @@ namespace {
: framework::HtmlStatusReporter(id, name),
_headerAddition(headerAddition),
_content(content)
- {}
+ {
+ }
- void reportHtmlHeaderAdditions(std::ostream& out, const framework::HttpUrlPath&) const override {
+ virtual void reportHtmlHeaderAdditions(
+ std::ostream& out, const framework::HttpUrlPath&) const override
+ {
out << _headerAddition;
}
- void reportHtmlStatus(std::ostream& out, const framework::HttpUrlPath&) const override {
+ virtual void reportHtmlStatus(
+ std::ostream& out, const framework::HttpUrlPath&) const override
+ {
out << _content;
}
};
@@ -57,9 +66,9 @@ namespace {
struct XmlStatusReporter : public framework::XmlStatusReporter {
XmlStatusReporter(const std::string& id, const std::string& name)
: framework::XmlStatusReporter(id, name) {}
-
- vespalib::string reportXmlStatus(vespalib::xml::XmlOutputStream& xos,
- const framework::HttpUrlPath&) const override
+ virtual vespalib::string reportXmlStatus(
+ vespalib::xml::XmlOutputStream& xos,
+ const framework::HttpUrlPath&) const override
{
xos << vespalib::xml::XmlTag("mytag")
<< vespalib::xml::XmlAttribute("foo", "bar")
diff --git a/storage/src/tests/persistence/bucketownershipnotifiertest.cpp b/storage/src/tests/persistence/bucketownershipnotifiertest.cpp
index 5f675c1d551..8553795db71 100644
--- a/storage/src/tests/persistence/bucketownershipnotifiertest.cpp
+++ b/storage/src/tests/persistence/bucketownershipnotifiertest.cpp
@@ -1,5 +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/vdstestlib/cppunit/macros.h>
#include <tests/distributor/messagesenderstub.h>
#include <tests/common/teststorageapp.h>
diff --git a/storage/src/tests/persistence/filestorage/filestormanagertest.cpp b/storage/src/tests/persistence/filestorage/filestormanagertest.cpp
index e2f41aa5b3e..e21d367370b 100644
--- a/storage/src/tests/persistence/filestorage/filestormanagertest.cpp
+++ b/storage/src/tests/persistence/filestorage/filestormanagertest.cpp
@@ -9,6 +9,7 @@
#include <vespa/document/select/parser.h>
#include <vespa/vdslib/state/random.h>
#include <vespa/vdslib/container/mutabledocumentlist.h>
+#include <vespa/vdslib/container/operationlist.h>
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/vespalib/io/fileutil.h>
#include <vespa/storageapi/message/bucket.h>
@@ -17,17 +18,25 @@
#include <vespa/storageapi/message/persistence.h>
#include <vespa/storageapi/message/removelocation.h>
#include <vespa/storage/bucketdb/bucketmanager.h>
+#include <vespa/storage/bucketdb/storbucketdb.h>
+#include <vespa/storage/common/bucketmessages.h>
+#include <vespa/storageframework/storageframework.h>
#include <vespa/storage/persistence/persistencethread.h>
+#include <vespa/storage/persistence/messages.h>
#include <vespa/storage/persistence/filestorage/filestormanager.h>
#include <vespa/storage/persistence/filestorage/modifiedbucketchecker.h>
#include <tests/common/testhelper.h>
#include <tests/common/storagelinktest.h>
#include <tests/common/teststorageapp.h>
+#include <tests/common/dummystoragelink.h>
#include <tests/persistence/filestorage/forwardingmessagesender.h>
#include <vespa/persistence/dummyimpl/dummypersistence.h>
#include <vespa/storageapi/message/batch.h>
#include <vespa/storage/storageserver/statemanager.h>
#include <vespa/fastos/file.h>
+#include <fstream>
+#include <memory>
+#include <atomic>
#include <vespa/log/log.h>
LOG_SETUP(".filestormanagertest");
@@ -2355,8 +2364,10 @@ namespace {
closeNextLink();
}
- void print(std::ostream& out, bool, const std::string&) const override { out << "MidLink"; }
- bool onUp(const std::shared_ptr<api::StorageMessage> & msg) override {
+ virtual void print(std::ostream& out, bool, const std::string&) const override
+ { out << "MidLink"; }
+
+ virtual bool onUp(const std::shared_ptr<api::StorageMessage> & msg) override {
if (!StorageLinkTest::callOnUp(_up, msg)) _up.sendUp(msg);
return true;
}
@@ -2384,9 +2395,10 @@ namespace {
_leftAddr(leftAddr),
_rightAddr(rightAddr) {}
- void print(std::ostream& out, bool, const std::string&) const override { out << "BinaryStorageLink"; }
+ virtual void print(std::ostream& out, bool, const std::string&) const override
+ { out << "BinaryStorageLink"; }
- bool onDown(const std::shared_ptr<api::StorageMessage> & msg) override {
+ virtual bool onDown(const std::shared_ptr<api::StorageMessage> & msg) override {
// LOG(debug, "onDown Received msg: ->%s, %s %llu\n", msg->getAddress() ? msg->getAddress()->toString().c_str() : "(null)", msg->toString().c_str(), msg->getMsgId());
vespalib::LockGuard lock(_lock);
@@ -2420,7 +2432,7 @@ namespace {
return true;
}
- bool onUp(const std::shared_ptr<api::StorageMessage> & msg) override {
+ virtual bool onUp(const std::shared_ptr<api::StorageMessage> & msg) override {
// LOG(debug, "onUp Received msg: ->%s, %s %llu\n", msg->getAddress() ? msg->getAddress()->toString().c_str() : "(null)", msg->toString().c_str(), msg->getMsgId());
vespalib::LockGuard lock(_lock);
diff --git a/storage/src/tests/persistence/filestorage/filestormodifiedbucketstest.cpp b/storage/src/tests/persistence/filestorage/filestormodifiedbucketstest.cpp
index 1409445b96b..d608bef3307 100644
--- a/storage/src/tests/persistence/filestorage/filestormodifiedbucketstest.cpp
+++ b/storage/src/tests/persistence/filestorage/filestormodifiedbucketstest.cpp
@@ -1,5 +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 <memory>
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/storageapi/message/bucket.h>
#include <vespa/storage/persistence/filestorage/modifiedbucketchecker.h>
diff --git a/storage/src/tests/persistence/filestorage/modifiedbucketcheckertest.cpp b/storage/src/tests/persistence/filestorage/modifiedbucketcheckertest.cpp
index 58b4ae4d475..2dc60594c45 100644
--- a/storage/src/tests/persistence/filestorage/modifiedbucketcheckertest.cpp
+++ b/storage/src/tests/persistence/filestorage/modifiedbucketcheckertest.cpp
@@ -1,11 +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/vdstestlib/cppunit/macros.h>
#include <tests/common/testhelper.h>
#include <tests/common/storagelinktest.h>
#include <tests/common/teststorageapp.h>
+#include <tests/common/dummystoragelink.h>
#include <vespa/persistence/dummyimpl/dummypersistence.h>
#include <vespa/storage/persistence/filestorage/modifiedbucketchecker.h>
+#include <vespa/storage/persistence/messages.h>
namespace storage {
diff --git a/storage/src/tests/persistence/legacyoperationhandlertest.cpp b/storage/src/tests/persistence/legacyoperationhandlertest.cpp
index 353a8d24ec5..df262501299 100644
--- a/storage/src/tests/persistence/legacyoperationhandlertest.cpp
+++ b/storage/src/tests/persistence/legacyoperationhandlertest.cpp
@@ -1,12 +1,15 @@
// 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/base/testdocrepo.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/documentapi/loadtypes/loadtype.h>
#include <vespa/storage/persistence/messages.h>
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/storageapi/message/multioperation.h>
#include <vespa/persistence/dummyimpl/dummypersistence.h>
#include <tests/persistence/persistencetestutils.h>
+#include <vespa/storage/persistence/types.h>
using document::DocumentTypeRepo;
using document::TestDocRepo;
diff --git a/storage/src/tests/persistence/mergehandlertest.cpp b/storage/src/tests/persistence/mergehandlertest.cpp
index 3f0623fbef0..8147992a516 100644
--- a/storage/src/tests/persistence/mergehandlertest.cpp
+++ b/storage/src/tests/persistence/mergehandlertest.cpp
@@ -3,13 +3,15 @@
#include <vespa/document/base/testdocman.h>
#include <vespa/storage/persistence/mergehandler.h>
#include <vespa/vdstestlib/cppunit/macros.h>
+#include <vespa/storageapi/message/bucket.h>
+#include <vespa/log/log.h>
#include <tests/persistence/persistencetestutils.h>
#include <tests/persistence/common/persistenceproviderwrapper.h>
#include <tests/distributor/messagesenderstub.h>
+#include <vespa/storageframework/defaultimplementation/clock/fakeclock.h>
#include <vespa/vespalib/objects/nbostream.h>
#include <cmath>
-#include <vespa/log/log.h>
LOG_SETUP(".test.persistence.handler.merge");
namespace storage {
diff --git a/storage/src/tests/persistence/providershutdownwrappertest.cpp b/storage/src/tests/persistence/providershutdownwrappertest.cpp
index c7f60a39cc8..8b1ef88aa2c 100644
--- a/storage/src/tests/persistence/providershutdownwrappertest.cpp
+++ b/storage/src/tests/persistence/providershutdownwrappertest.cpp
@@ -1,8 +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/vdstestlib/cppunit/macros.h>
#include <tests/persistence/persistencetestutils.h>
#include <tests/persistence/common/persistenceproviderwrapper.h>
+#include <vespa/storage/persistence/providershutdownwrapper.h>
namespace storage {
diff --git a/storage/src/tests/storageserver/bouncertest.cpp b/storage/src/tests/storageserver/bouncertest.cpp
index 751d6b535a3..e5b9a3e6092 100644
--- a/storage/src/tests/storageserver/bouncertest.cpp
+++ b/storage/src/tests/storageserver/bouncertest.cpp
@@ -1,7 +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/pointer_cast.hpp>
#include <cppunit/extensions/HelperMacros.h>
+#include <iostream>
+#include <string>
#include <vespa/storageapi/message/bucket.h>
#include <vespa/storageapi/message/state.h>
#include <vespa/storageapi/message/stat.h>
diff --git a/storage/src/tests/storageserver/bucketintegritycheckertest.cpp b/storage/src/tests/storageserver/bucketintegritycheckertest.cpp
index f4eedc64971..d9a175f3b04 100644
--- a/storage/src/tests/storageserver/bucketintegritycheckertest.cpp
+++ b/storage/src/tests/storageserver/bucketintegritycheckertest.cpp
@@ -1,14 +1,18 @@
// 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/log/log.h>
#include <vespa/storage/bucketdb/bucketmanager.h>
+#include <vespa/storage/bucketdb/storbucketdb.h>
#include <vespa/storage/persistence/filestorage/filestormanager.h>
#include <vespa/storage/storageserver/bucketintegritychecker.h>
+#include <vespa/storageapi/message/bucket.h>
#include <vespa/storageapi/message/persistence.h>
#include <tests/common/testhelper.h>
#include <tests/common/storagelinktest.h>
+#include <tests/common/dummystoragelink.h>
#include <vespa/vespalib/io/fileutil.h>
#include <tests/common/teststorageapp.h>
diff --git a/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp b/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp
index 89eaff0ab6e..8eb6b74a840 100644
--- a/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp
+++ b/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp
@@ -1,5 +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/document/base/testdocman.h>
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/storage/bucketdb/storbucketdb.h>
@@ -14,6 +15,7 @@
#include <tests/common/testhelper.h>
#include <tests/common/dummystoragelink.h>
#include <vespa/storage/storageserver/changedbucketownershiphandler.h>
+#include <memory>
namespace storage {
diff --git a/storage/src/tests/storageserver/priorityconvertertest.cpp b/storage/src/tests/storageserver/priorityconvertertest.cpp
index ab6c27f48d6..ecbbd25b8b1 100644
--- a/storage/src/tests/storageserver/priorityconvertertest.cpp
+++ b/storage/src/tests/storageserver/priorityconvertertest.cpp
@@ -1,5 +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/documentapi.h>
#include <vespa/storage/storageserver/priorityconverter.h>
#include <tests/common/testhelper.h>
diff --git a/storage/src/tests/storageserver/statemanagertest.cpp b/storage/src/tests/storageserver/statemanagertest.cpp
index f9c5c97e6bc..4244ce0c4ce 100644
--- a/storage/src/tests/storageserver/statemanagertest.cpp
+++ b/storage/src/tests/storageserver/statemanagertest.cpp
@@ -1,15 +1,19 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <boost/pointer_cast.hpp>
#include <cppunit/extensions/HelperMacros.h>
#include <vespa/metrics/metricmanager.h>
#include <vespa/storageapi/message/bucket.h>
#include <vespa/storageapi/message/state.h>
+#include <vespa/vdslib/state/nodestate.h>
#include <vespa/storage/frameworkimpl/component/storagecomponentregisterimpl.h>
#include <vespa/storage/storageserver/statemanager.h>
+#include <vespa/storage/common/hostreporter/hostinfo.h>
#include <tests/common/teststorageapp.h>
#include <tests/common/testhelper.h>
#include <tests/common/dummystoragelink.h>
#include <vespa/vespalib/data/slime/slime.h>
+#include <iostream>
using storage::lib::NodeState;
using storage::lib::NodeType;
@@ -134,7 +138,8 @@ namespace {
MyStateListener(const NodeStateUpdater& upd)
: updater(upd), current(*updater.getReportedNodeState()) {}
- void handleNewState() override {
+ void handleNewState() override
+ {
ost << current << " -> ";
current = *updater.getReportedNodeState();
ost << current << "\n";
@@ -254,3 +259,4 @@ StateManagerTest::testClusterStateVersion()
}
} // storage
+
diff --git a/storage/src/tests/storageserver/statereportertest.cpp b/storage/src/tests/storageserver/statereportertest.cpp
index 8a164361c88..265b9e95d83 100644
--- a/storage/src/tests/storageserver/statereportertest.cpp
+++ b/storage/src/tests/storageserver/statereportertest.cpp
@@ -18,8 +18,8 @@ namespace storage {
class DummyApplicationGenerationFether : public ApplicationGenerationFetcher {
public:
- int64_t getGeneration() const override { return 1; }
- std::string getComponentName() const override { return "component"; }
+ virtual int64_t getGeneration() const override { return 1; }
+ virtual std::string getComponentName() const override { return "component"; }
};
struct StateReporterTest : public CppUnit::TestFixture {
@@ -58,8 +58,10 @@ namespace {
{
framework::Clock& _clock;
MetricClock(framework::Clock& c) : _clock(c) {}
- time_t getTime() const override { return _clock.getTimeInSeconds().getTime(); }
- time_t getTimeInMilliSecs() const override { return _clock.getTimeInMillis().getTime(); }
+ virtual time_t getTime() const override
+ { return _clock.getTimeInSeconds().getTime(); }
+ virtual time_t getTimeInMilliSecs() const override
+ { return _clock.getTimeInMillis().getTime(); }
};
}
diff --git a/storage/src/tests/storageutil/charttest.cpp b/storage/src/tests/storageutil/charttest.cpp
index c7c1c43b000..4f83a9f26f4 100644
--- a/storage/src/tests/storageutil/charttest.cpp
+++ b/storage/src/tests/storageutil/charttest.cpp
@@ -1,13 +1,18 @@
// 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/storage/storageutil/piechart.h>
-#include <vespa/vdstestlib/cppunit/macros.h>
+
#include <fstream>
+#include <vespa/vdstestlib/cppunit/macros.h>
namespace storage {
struct PieChartTest : public CppUnit::TestFixture
{
+ void setUp() override {}
+ void tearDown() override {}
+
void testWriteHtmlFile();
CPPUNIT_TEST_SUITE(PieChartTest);
diff --git a/storage/src/tests/storageutil/palettetest.cpp b/storage/src/tests/storageutil/palettetest.cpp
index 24eaee18996..e5a4e73d58a 100644
--- a/storage/src/tests/storageutil/palettetest.cpp
+++ b/storage/src/tests/storageutil/palettetest.cpp
@@ -1,11 +1,15 @@
// 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/storage/storageutil/palette.h>
#include <vespa/vdstestlib/cppunit/macros.h>
namespace storage {
struct PaletteTest : public CppUnit::TestFixture {
+ void setUp() override {}
+ void tearDown() override {}
+
void testNormalUsage();
CPPUNIT_TEST_SUITE(PaletteTest);
diff --git a/storage/src/tests/testrunner.cpp b/storage/src/tests/testrunner.cpp
index 9bf86e3276a..5d8dc8d4c1f 100644
--- a/storage/src/tests/testrunner.cpp
+++ b/storage/src/tests/testrunner.cpp
@@ -1,12 +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 <iostream>
+#include <vespa/log/log.h>
#include <vespa/vdstestlib/cppunit/cppunittestrunner.h>
-#include <vespa/log/log.h>
LOG_SETUP("storagecppunittests");
int
-main(int argc, const char *argv[])
+main(int argc, char **argv)
{
vdstestlib::CppUnitTestRunner testRunner;
return testRunner.run(argc, argv);
diff --git a/storage/src/tests/visiting/visitormanagertest.cpp b/storage/src/tests/visiting/visitormanagertest.cpp
index 1824b976aea..8aa57b982db 100644
--- a/storage/src/tests/visiting/visitormanagertest.cpp
+++ b/storage/src/tests/visiting/visitormanagertest.cpp
@@ -1,11 +1,15 @@
// 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/datatype/datatype.h>
#include <vespa/document/fieldvalue/intfieldvalue.h>
#include <vespa/document/fieldvalue/stringfieldvalue.h>
#include <vespa/document/fieldvalue/rawfieldvalue.h>
+#include <vespa/log/log.h>
#include <vespa/storageapi/message/datagram.h>
#include <vespa/storageapi/message/persistence.h>
+#include <vespa/storageapi/message/visitor.h>
+#include <vector>
#include <vespa/storage/persistence/filestorage/filestormanager.h>
#include <vespa/storage/visiting/visitormanager.h>
#include <vespa/storageframework/defaultimplementation/clock/realclock.h>
@@ -13,11 +17,16 @@
#include <tests/common/testhelper.h>
#include <tests/common/dummystoragelink.h>
#include <tests/storageserver/testvisitormessagesession.h>
+#include <vespa/vdstestlib/cppunit/macros.h>
+#include <vespa/vdslib/container/visitorordering.h>
#include <vespa/documentapi/messagebus/messages/multioperationmessage.h>
#include <vespa/documentapi/messagebus/messages/putdocumentmessage.h>
#include <vespa/documentapi/messagebus/messages/removedocumentmessage.h>
#include <vespa/vespalib/util/exceptions.h>
+
+LOG_SETUP(".visitormanagertest");
+
namespace storage {
namespace {
typedef std::vector<api::StorageMessage::SP> msg_ptr_vector;
@@ -104,6 +113,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION(VisitorManagerTest);
void
VisitorManagerTest::initializeTest()
{
+ LOG(debug, "Initializing test");
vdstestlib::DirConfig config(getStandardConfig(true));
config.getConfig("stor-visitor").set("visitorthreads", "1");
@@ -211,6 +221,7 @@ VisitorManagerTest::initializeTest()
CPPUNIT_ASSERT_EQUAL(api::ReturnCode(api::ReturnCode::OK),
reply->getResult());
}
+ LOG(debug, "Done initializing test");
}
void
diff --git a/storage/src/tests/visiting/visitortest.cpp b/storage/src/tests/visiting/visitortest.cpp
index 84f1297b05f..e6a3542cbf2 100644
--- a/storage/src/tests/visiting/visitortest.cpp
+++ b/storage/src/tests/visiting/visitortest.cpp
@@ -6,17 +6,25 @@
#include <vespa/document/fieldvalue/rawfieldvalue.h>
#include <vespa/storageapi/message/datagram.h>
#include <vespa/storageapi/message/persistence.h>
+#include <vespa/storageapi/message/visitor.h>
#include <vespa/storage/persistence/filestorage/filestormanager.h>
#include <vespa/storage/visiting/visitormanager.h>
#include <tests/common/testhelper.h>
#include <tests/common/teststorageapp.h>
#include <tests/common/dummystoragelink.h>
#include <tests/storageserver/testvisitormessagesession.h>
+#include <vespa/vdstestlib/cppunit/macros.h>
+#include <vespa/vdslib/container/visitorordering.h>
#include <vespa/documentapi/messagebus/messages/multioperationmessage.h>
#include <vespa/documentapi/messagebus/messages/putdocumentmessage.h>
#include <vespa/documentapi/messagebus/messages/removedocumentmessage.h>
#include <vespa/vespalib/util/exceptions.h>
+#include <vector>
#include <thread>
+#include <chrono>
+
+#include <vespa/log/log.h>
+LOG_SETUP(".visitortest");
using namespace std::chrono_literals;
@@ -177,6 +185,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION(VisitorTest);
void
VisitorTest::initializeTest(const TestParams& params)
{
+ LOG(debug, "Initializing test");
vdstestlib::DirConfig config(getStandardConfig(true, "visitortest"));
config.getConfig("stor-visitor").set("visitorthreads", "1");
config.getConfig("stor-visitor").set(
@@ -264,6 +273,7 @@ VisitorTest::initializeTest(const TestParams& params)
_documents.back()->setValue(type.getField("headerval"),
document::IntFieldValue(i % 4));
}
+ LOG(debug, "Done initializing test");
}
void