fw: pull FaceTable construction out of Forwarder class
Refs: #4922, #4973
Change-Id: Ibbd4a8840cb0d01ebbd4cabf9c34fa78a1d23db1
diff --git a/tests/daemon/fw/retx-suppression.t.cpp b/tests/daemon/fw/retx-suppression.t.cpp
index 07831ae..3522ace 100644
--- a/tests/daemon/fw/retx-suppression.t.cpp
+++ b/tests/daemon/fw/retx-suppression.t.cpp
@@ -42,7 +42,8 @@
BOOST_AUTO_TEST_CASE(Fixed)
{
- Forwarder forwarder;
+ FaceTable faceTable;
+ Forwarder forwarder(faceTable);
Pit& pit = forwarder.getPit();
static const time::milliseconds MIN_RETX_INTERVAL(200);
RetxSuppressionFixed rs(MIN_RETX_INTERVAL);
@@ -50,9 +51,9 @@
shared_ptr<DummyFace> face1 = make_shared<DummyFace>();
shared_ptr<DummyFace> face2 = make_shared<DummyFace>();
shared_ptr<DummyFace> face3 = make_shared<DummyFace>();
- forwarder.addFace(face1);
- forwarder.addFace(face2);
- forwarder.addFace(face3);
+ faceTable.add(face1);
+ faceTable.add(face2);
+ faceTable.add(face3);
shared_ptr<Interest> interest = makeInterest("ndn:/0JiimvmxK8");
shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
@@ -91,14 +92,15 @@
BOOST_AUTO_TEST_CASE(Exponential)
{
- Forwarder forwarder;
+ FaceTable faceTable;
+ Forwarder forwarder(faceTable);
Pit& pit = forwarder.getPit();
RetxSuppressionExponential rs(10_ms, 3.0, 100_ms);
shared_ptr<DummyFace> face1 = make_shared<DummyFace>();
shared_ptr<DummyFace> face2 = make_shared<DummyFace>();
- forwarder.addFace(face1);
- forwarder.addFace(face2);
+ faceTable.add(face1);
+ faceTable.add(face2);
shared_ptr<Interest> interest = makeInterest("ndn:/smuVeQSW6q");
shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
@@ -159,14 +161,15 @@
BOOST_AUTO_TEST_CASE(ExponentialPerUpstream)
{
- Forwarder forwarder;
+ FaceTable faceTable;
+ Forwarder forwarder(faceTable);
Pit& pit = forwarder.getPit();
RetxSuppressionExponential rs(10_ms, 3.0, 100_ms);
shared_ptr<DummyFace> face1 = make_shared<DummyFace>();
shared_ptr<DummyFace> face2 = make_shared<DummyFace>();
- forwarder.addFace(face1);
- forwarder.addFace(face2);
+ faceTable.add(face1);
+ faceTable.add(face2);
shared_ptr<Interest> interest = makeInterest("ndn:/covfefeW6q");
shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;