fw: Remove NACKs from multicast strategy
Change-Id: I49b833ec0ad990dfdf547aef80915e3fc83389ec
Refs: #5146
diff --git a/tests/daemon/fw/strategy-scope-control.t.cpp b/tests/daemon/fw/strategy-scope-control.t.cpp
index 268ae67..123a4f8 100644
--- a/tests/daemon/fw/strategy-scope-control.t.cpp
+++ b/tests/daemon/fw/strategy-scope-control.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -87,13 +87,19 @@
BOOST_AUTO_TEST_SUITE(Fw)
BOOST_AUTO_TEST_SUITE(TestStrategyScopeControl)
-template<typename S, bool WillSendNackNoRoute, bool CanProcessNack>
+template<typename S, bool WillSendNackNoRoute, bool CanProcessNack, bool WillRejectPitEntry = true>
class Test
{
public:
using Strategy = S;
static bool
+ willRejectPitEntry()
+ {
+ return WillRejectPitEntry;
+ }
+
+ static bool
willSendNackNoRoute()
{
return WillSendNackNoRoute;
@@ -111,7 +117,7 @@
Test<AsfStrategy, true, false>,
Test<BestRouteStrategy, false, false>,
Test<BestRouteStrategy2, true, true>,
- Test<MulticastStrategy, true, true>,
+ Test<MulticastStrategy, false, false, false>,
Test<NccStrategy, false, false>,
Test<RandomStrategy, true, true>
>;
@@ -147,10 +153,10 @@
BOOST_REQUIRE(this->strategy.waitForAction(
[&] { this->strategy.afterReceiveInterest(FaceEndpoint(*this->localFace3, 0), *interest, pitEntry); },
- this->limitedIo, 1 + T::willSendNackNoRoute()));
+ this->limitedIo, T::willRejectPitEntry() + T::willSendNackNoRoute()));
BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 0);
- BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), 1);
+ BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), T::willRejectPitEntry());
if (T::willSendNackNoRoute()) {
BOOST_REQUIRE_EQUAL(this->strategy.sendNackHistory.size(), 1);
BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.back().header.getReason(), lp::NackReason::NO_ROUTE);
@@ -190,10 +196,10 @@
BOOST_REQUIRE(this->strategy.waitForAction(
[&] { this->strategy.afterReceiveInterest(FaceEndpoint(*this->nonLocalFace1, 0), *interest, pitEntry); },
- this->limitedIo, 1 + T::willSendNackNoRoute()));
+ this->limitedIo, T::willRejectPitEntry() + T::willSendNackNoRoute()));
BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 0);
- BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), 1);
+ BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), T::willRejectPitEntry());
if (T::willSendNackNoRoute()) {
BOOST_REQUIRE_EQUAL(this->strategy.sendNackHistory.size(), 1);
BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.back().header.getReason(), lp::NackReason::NO_ROUTE);