aboutsummaryrefslogtreecommitdiffstats
path: root/filedistribution
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-04-05 02:32:06 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-04-23 02:03:47 +0200
commitb57308e4a134fb6139d2cb52a031d3e7185f16cf (patch)
tree7c31d445e2f76bb737ef90ce29e0e7e6738d6eb1 /filedistribution
parent40b8ba5a3f34028d208d4e0dc1b46940d6fe5a47 (diff)
Use override
Diffstat (limited to 'filedistribution')
-rw-r--r--filedistribution/src/tests/filedownloader/testfiledownloader.cpp20
-rw-r--r--filedistribution/src/tests/rpc/mockfileprovider.h1
-rw-r--r--filedistribution/src/tests/scheduler/test-scheduler.cpp3
-rw-r--r--filedistribution/src/tests/zkfacade/test-zkfacade.cpp6
-rw-r--r--filedistribution/src/vespa/filedistribution/distributor/filedistributortrackerimpl.cpp7
-rw-r--r--filedistribution/src/vespa/filedistribution/model/filedistributionmodelimpl.cpp15
-rw-r--r--filedistribution/src/vespa/filedistribution/model/filedistributionmodelimpl.h2
7 files changed, 15 insertions, 39 deletions
diff --git a/filedistribution/src/tests/filedownloader/testfiledownloader.cpp b/filedistribution/src/tests/filedownloader/testfiledownloader.cpp
index 56a664ea7e1..9bf96abc1eb 100644
--- a/filedistribution/src/tests/filedownloader/testfiledownloader.cpp
+++ b/filedistribution/src/tests/filedownloader/testfiledownloader.cpp
@@ -2,7 +2,6 @@
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MAIN
-#include <vespa/fastos/fastos.h>
#include <vespa/filedistribution/distributor/filedownloader.h>
#include <vespa/filedistribution/distributor/filedistributortrackerimpl.h>
@@ -12,12 +11,7 @@
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
-#include <libtorrent/session.hpp>
-#include <libtorrent/tracker_manager.hpp>
-#include <libtorrent/torrent.hpp>
-
#include <vespa/filedistribution/manager/createtorrent.h>
-#include <vespa/filedistribution/model/filedistributionmodel.h>
#include <vespa/filedistribution/common/componentsdeleter.h>
namespace fs = boost::filesystem;
@@ -47,16 +41,16 @@ createDownloader(ComponentsDeleter& deleter,
} //anonymous namespace
class MockFileDistributionModel : public FileDistributionModel {
- virtual FileDBModel& getFileDBModel() override {
+ FileDBModel& getFileDBModel() override {
abort();
}
- virtual std::set<std::string> getFilesToDownload() override {
+ std::set<std::string> getFilesToDownload() override {
return std::set<std::string>();
}
- virtual PeerEntries getPeers(const std::string&, size_t) override {
- PeerEntries peers(2);
+ PeerEntries getPeers(const std::string& , size_t) override {
+ PeerEntries peers(2);
peers[0].ip = localHost;
peers[0].port = uploaderPort;
@@ -66,9 +60,9 @@ class MockFileDistributionModel : public FileDistributionModel {
return peers;
}
- virtual void addPeer(const std::string&) override {}
- virtual void removePeer(const std::string&) override {}
- virtual void peerFinished(const std::string&) override {}
+ void addPeer(const std::string&) override {}
+ void removePeer(const std::string&) override {}
+ void peerFinished(const std::string&) override {}
};
diff --git a/filedistribution/src/tests/rpc/mockfileprovider.h b/filedistribution/src/tests/rpc/mockfileprovider.h
index 33177d939c1..fd66acfb0fc 100644
--- a/filedistribution/src/tests/rpc/mockfileprovider.h
+++ b/filedistribution/src/tests/rpc/mockfileprovider.h
@@ -32,7 +32,6 @@ public:
downloadCompleted()(fileReference, "downloaded/path/" + fileReference);
}
- //Overrides
DownloadCompletedSignal& downloadCompleted() override {
return _downloadCompleted;
}
diff --git a/filedistribution/src/tests/scheduler/test-scheduler.cpp b/filedistribution/src/tests/scheduler/test-scheduler.cpp
index 5be60569449..1ce5cbb9bc2 100644
--- a/filedistribution/src/tests/scheduler/test-scheduler.cpp
+++ b/filedistribution/src/tests/scheduler/test-scheduler.cpp
@@ -1,7 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MAIN
-#include <vespa/fastos/fastos.h>
+
#include <boost/test/unit_test.hpp>
#include <vespa/filedistribution/distributor/scheduler.h>
@@ -9,7 +9,6 @@
#include <iostream>
#include <boost/thread/barrier.hpp>
-#include <thread>
using filedistribution::Scheduler;
using namespace std::literals;
diff --git a/filedistribution/src/tests/zkfacade/test-zkfacade.cpp b/filedistribution/src/tests/zkfacade/test-zkfacade.cpp
index 46db660d452..51a3f0b40e3 100644
--- a/filedistribution/src/tests/zkfacade/test-zkfacade.cpp
+++ b/filedistribution/src/tests/zkfacade/test-zkfacade.cpp
@@ -2,14 +2,10 @@
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MAIN
#define BOOST_TEST_MODULE zkfacade test
-#include <vespa/fastos/fastos.h>
-#include <boost/test/unit_test.hpp>
+#include <boost/test/unit_test.hpp>
#include <iostream>
-
#include <boost/thread/barrier.hpp>
-#include <boost/checked_delete.hpp>
-
#include <vespa/filedistribution/common/componentsdeleter.h>
#include <vespa/filedistribution/model/zkfacade.h>
diff --git a/filedistribution/src/vespa/filedistribution/distributor/filedistributortrackerimpl.cpp b/filedistribution/src/vespa/filedistribution/distributor/filedistributortrackerimpl.cpp
index 1db2f7c6e49..9906074afc5 100644
--- a/filedistribution/src/vespa/filedistribution/distributor/filedistributortrackerimpl.cpp
+++ b/filedistribution/src/vespa/filedistribution/distributor/filedistributortrackerimpl.cpp
@@ -1,13 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "filedistributortrackerimpl.h"
-#include <cmath>
-#include <libtorrent/tracker_manager.hpp>
-#include <libtorrent/torrent.hpp>
-#include <vespa/filedistribution/model/filedistributionmodel.h>
-#include <vespa/filedistribution/model/zkfacade.h>
#include "filedownloader.h"
-#include "hostname.h"
+#include <vespa/filedistribution/model/zkfacade.h>
#include <vespa/log/log.h>
LOG_SETUP(".filedistributiontrackerimpl");
diff --git a/filedistribution/src/vespa/filedistribution/model/filedistributionmodelimpl.cpp b/filedistribution/src/vespa/filedistribution/model/filedistributionmodelimpl.cpp
index 0288f3082f8..3b4d043a30b 100644
--- a/filedistribution/src/vespa/filedistribution/model/filedistributionmodelimpl.cpp
+++ b/filedistribution/src/vespa/filedistribution/model/filedistributionmodelimpl.cpp
@@ -1,22 +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 "filedistributionmodel.h"
-
-#include <vector>
-#include <set>
-#include <string>
-#include <cstdlib>
+#include "filedistributionmodel.h"
+#include "zkfiledbmodel.h"
+#include "deployedfilestodownload.h"
+#include "filedistributionmodelimpl.h"
#include <boost/filesystem.hpp>
#include <zookeeper/zookeeper.h>
#include <vespa/log/log.h>
LOG_SETUP(".filedistributionmodel");
-#include "zkfiledbmodel.h"
-#include "deployedfilestodownload.h"
-#include "filedistributionmodelimpl.h"
-
namespace fs = boost::filesystem;
using filedistribution::ZKFileDBModel;
diff --git a/filedistribution/src/vespa/filedistribution/model/filedistributionmodelimpl.h b/filedistribution/src/vespa/filedistribution/model/filedistributionmodelimpl.h
index e132ec8b230..4b2b14ea21f 100644
--- a/filedistribution/src/vespa/filedistribution/model/filedistributionmodelimpl.h
+++ b/filedistribution/src/vespa/filedistribution/model/filedistributionmodelimpl.h
@@ -2,7 +2,7 @@
#pragma once
#include "filedistributionmodel.h"
-#include <vespa/filedistribution/model/config-filereferences.h>
+#include "config-filereferences.h"
#include "zkfacade.h"
#include "zkfiledbmodel.h"
#include <vespa/config/config.h>