fw: AccessStrategy avoid loop back new Interest

refs #2831

Change-Id: I1680fd62cdf8f11eaa7817dd6d4b7794c305c5eb
diff --git a/tests/daemon/fw/access-strategy.t.cpp b/tests/daemon/fw/access-strategy.t.cpp
index 732e0e8..ddc0092 100644
--- a/tests/daemon/fw/access-strategy.t.cpp
+++ b/tests/daemon/fw/access-strategy.t.cpp
@@ -350,6 +350,23 @@
   BOOST_CHECK_EQUAL(hasData2c, true);
 }
 
+BOOST_FIXTURE_TEST_CASE(Bug2831, TwoLaptopsFixture)
+{
+  // make a two-node loop
+  topo.registerPrefix(laptopA, linkA->getFace(laptopA), "ndn:/net");
+  topo.registerPrefix(router, linkA->getFace(router), "ndn:/net");
+
+  // send Interests from laptopA to router
+  shared_ptr<TopologyAppLink> consumer = topo.addAppFace(laptopA);
+  topo.addIntervalConsumer(*consumer->getClientFace(), "ndn:/net",
+                           time::milliseconds(100), 10);
+
+  this->advanceClocks(time::milliseconds(5), time::seconds(2));
+
+  // Interest shouldn't loop back from router
+  BOOST_CHECK_EQUAL(linkA->getFace(router)->m_sentInterests.size(), 0);
+}
+
 BOOST_AUTO_TEST_SUITE_END()
 
 } // namespace tests