From 9ff4bdb407ed8d855a3f86a17c99906ff738177b Mon Sep 17 00:00:00 2001 From: Arne H Juul Date: Mon, 24 Apr 2017 12:10:42 +0200 Subject: Revert "Balder/enforce override 2" --- storage/src/tests/bucketdb/initializertest.cpp | 3 +-- storage/src/tests/bucketmover/bucketmovertest.cpp | 1 + storage/src/tests/common/metricstest.cpp | 6 ++++-- .../distributor/blockingoperationstartertest.cpp | 4 ++++ .../src/tests/distributor/bucketdatabasetest.cpp | 3 +++ .../src/tests/distributor/bucketdbupdatertest.cpp | 1 + .../tests/distributor/bucketstateoperationtest.cpp | 7 ++++-- .../distributor_host_info_reporter_test.cpp | 1 + storage/src/tests/distributor/distributortest.cpp | 3 +++ .../tests/distributor/idealstatemanagertest.cpp | 1 + .../tests/distributor/mapbucketdatabasetest.cpp | 7 +++++- .../src/tests/distributor/mergeoperationtest.cpp | 1 + storage/src/tests/distributor/messagesenderstub.h | 8 ++++--- .../distributor/operationtargetresolvertest.cpp | 2 ++ .../distributor/pendingmessagetrackertest.cpp | 8 +++++++ .../distributor/simplemaintenancescannertest.cpp | 7 ++++++ .../distributor/statusreporterdelegatetest.cpp | 2 +- .../distributor/throttlingoperationstartertest.cpp | 4 ++++ .../src/tests/frameworkimpl/status/statustest.cpp | 25 +++++++++++++++------- .../persistence/bucketownershipnotifiertest.cpp | 1 + .../filestorage/filestormanagertest.cpp | 22 ++++++++++++++----- .../filestorage/filestormodifiedbucketstest.cpp | 3 ++- .../filestorage/modifiedbucketcheckertest.cpp | 3 +++ .../persistence/legacyoperationhandlertest.cpp | 3 +++ storage/src/tests/persistence/mergehandlertest.cpp | 4 +++- .../persistence/providershutdownwrappertest.cpp | 2 ++ storage/src/tests/storageserver/bouncertest.cpp | 3 +++ .../storageserver/bucketintegritycheckertest.cpp | 4 ++++ .../changedbucketownershiphandlertest.cpp | 2 ++ .../tests/storageserver/priorityconvertertest.cpp | 1 + .../src/tests/storageserver/statemanagertest.cpp | 8 ++++++- .../src/tests/storageserver/statereportertest.cpp | 10 +++++---- storage/src/tests/storageutil/charttest.cpp | 7 +++++- storage/src/tests/storageutil/palettetest.cpp | 4 ++++ storage/src/tests/testrunner.cpp | 6 ++++-- storage/src/tests/visiting/visitormanagertest.cpp | 11 ++++++++++ storage/src/tests/visiting/visitortest.cpp | 10 +++++++++ 37 files changed, 164 insertions(+), 34 deletions(-) (limited to 'storage/src/tests') 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 #include #include #include 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 #include +#include +#include +#include #include #include #include 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 #include #include +#include +#include #include 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 #include +#include 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 #include #include +#include #include #include #include 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 +#include +#include #include // for 'operator+=()' #include #include 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 + 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 +#include #include +#include #include +#include #include 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 #include #include #include 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 -#include namespace storage { @@ -21,11 +20,13 @@ struct MessageSenderStub : distributor::DistributorMessageSender replies.clear(); } - virtual void sendCommand(const std::shared_ptr& cmd) { + virtual void sendCommand(const std::shared_ptr& cmd) + { commands.push_back(cmd); } - virtual void sendReply(const std::shared_ptr& reply) { + virtual void sendReply(const std::shared_ptr& 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 +#include #include #include #include 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 #include #include @@ -9,6 +10,13 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include 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 #include #include #include #include #include +#include +#include +#include +#include +#include + 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 #include #include #include 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 #include +#include +#include +#include #include #include 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 +#include +#include +#include #include #include #include #include #include -#include -#include + +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 #include #include #include 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 #include #include +#include #include #include #include @@ -17,17 +18,25 @@ #include #include #include +#include +#include +#include #include +#include #include #include #include #include #include +#include #include #include #include #include #include +#include +#include +#include #include 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 & msg) override { + virtual void print(std::ostream& out, bool, const std::string&) const override + { out << "MidLink"; } + + virtual bool onUp(const std::shared_ptr & 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 & msg) override { + virtual bool onDown(const std::shared_ptr & 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 & msg) override { + virtual bool onUp(const std::shared_ptr & 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 +#include #include #include #include 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 #include #include #include #include +#include #include #include +#include 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 #include +#include #include #include #include #include #include #include +#include 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 #include #include +#include +#include #include #include #include +#include #include #include -#include 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 #include #include #include +#include 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 #include #include +#include +#include #include #include #include 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 #include #include #include #include +#include #include #include +#include #include #include #include +#include #include #include 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 #include #include #include @@ -14,6 +15,7 @@ #include #include #include +#include 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 #include #include #include 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 #include #include #include #include +#include #include #include +#include #include #include #include #include +#include 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 #include -#include + #include +#include 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 #include #include 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 +#include +#include #include -#include 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 #include #include #include #include +#include #include #include +#include +#include #include #include #include @@ -13,11 +17,16 @@ #include #include #include +#include +#include #include #include #include #include + +LOG_SETUP(".visitormanagertest"); + namespace storage { namespace { typedef std::vector 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 #include #include +#include #include #include #include #include #include #include +#include +#include #include #include #include #include +#include #include +#include + +#include +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 -- cgit v1.2.3