mgmt+rib: use getScheduler() in RibManager and Readvertise
Refs: #4528
Change-Id: Ie6dd2b0fbe5d57cd7878d86b0185ae5d9bd92cf0
diff --git a/tests/daemon/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp b/tests/daemon/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp
index 1b357cb..c455065 100644
--- a/tests/daemon/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp
+++ b/tests/daemon/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -38,8 +38,9 @@
class HostToGatewayReadvertisePolicyFixture : public IdentityManagementFixture
{
public:
- RibRouteRef
- makeNewRoute(const Name& prefix) {
+ static RibRouteRef
+ makeNewRoute(const Name& prefix)
+ {
auto entry = make_shared<RibEntry>();
entry->setName(prefix);
@@ -56,8 +57,7 @@
};
BOOST_AUTO_TEST_SUITE(Readvertise)
-BOOST_FIXTURE_TEST_SUITE(TestHostToGatewayReadvertisePolicy,
- HostToGatewayReadvertisePolicyFixture)
+BOOST_FIXTURE_TEST_SUITE(TestHostToGatewayReadvertisePolicy, HostToGatewayReadvertisePolicyFixture)
BOOST_AUTO_TEST_CASE(PrefixToAdvertise)
{
diff --git a/tests/daemon/rib/readvertise/nfd-rib-readvertise-destination.t.cpp b/tests/daemon/rib/readvertise/nfd-rib-readvertise-destination.t.cpp
index d3ec057..e3afcbf 100644
--- a/tests/daemon/rib/readvertise/nfd-rib-readvertise-destination.t.cpp
+++ b/tests/daemon/rib/readvertise/nfd-rib-readvertise-destination.t.cpp
@@ -44,11 +44,10 @@
: nSuccessCallbacks(0)
, nFailureCallbacks(0)
, face(g_io, m_keyChain, {true, false})
- , scheduler(g_io)
, controller(face, m_keyChain)
, dest(controller, rib, ndn::nfd::CommandOptions().setPrefix("/localhost/nlsr"))
, successCallback([this] { nSuccessCallbacks++; })
- , failureCallback([this] (const std::string& str) { nFailureCallbacks++; })
+ , failureCallback([this] (const std::string&) { nFailureCallbacks++; })
{
}
@@ -58,7 +57,6 @@
protected:
ndn::util::DummyClientFace face;
- Scheduler scheduler;
ndn::nfd::Controller controller;
Rib rib;
NfdRibReadvertiseDestination dest;
diff --git a/tests/daemon/rib/readvertise/readvertise.t.cpp b/tests/daemon/rib/readvertise/readvertise.t.cpp
index f73efbd..d2d8bb2 100644
--- a/tests/daemon/rib/readvertise/readvertise.t.cpp
+++ b/tests/daemon/rib/readvertise/readvertise.t.cpp
@@ -41,7 +41,7 @@
{
public:
optional<ReadvertiseAction>
- handleNewRoute(const RibRouteRef& route) const override
+ handleNewRoute(const RibRouteRef&) const override
{
return this->decision;
}
@@ -49,7 +49,7 @@
time::milliseconds
getRefreshInterval() const override
{
- return time::seconds(60);
+ return 1_min;
}
public:
@@ -115,14 +115,12 @@
public:
ReadvertiseFixture()
: m_face(g_io, m_keyChain, {false, false})
- , m_scheduler(g_io)
{
- auto policyUnique = make_unique<DummyReadvertisePolicy>();
- policy = policyUnique.get();
- auto destinationUnique = make_unique<DummyReadvertiseDestination>();
- destination = destinationUnique.get();
- readvertise = make_unique<Readvertise>(m_rib, m_scheduler,
- std::move(policyUnique), std::move(destinationUnique));
+ auto policyPtr = make_unique<DummyReadvertisePolicy>();
+ policy = policyPtr.get();
+ auto destinationPtr = make_unique<DummyReadvertiseDestination>();
+ destination = destinationPtr.get();
+ readvertise = make_unique<Readvertise>(m_rib, std::move(policyPtr), std::move(destinationPtr));
}
void
@@ -159,7 +157,6 @@
private:
ndn::util::DummyClientFace m_face;
- Scheduler m_scheduler;
Rib m_rib;
};