Use separate name prefix and sequence number for each LSA type
refs: #1523
Change-Id: I9db6b3a3ea9ce5e17e132d2a4e2ae9f30dd4f591
diff --git a/tests/update/test-prefix-update-processor.cpp b/tests/update/test-prefix-update-processor.cpp
index 169fc48..efb24a0 100644
--- a/tests/update/test-prefix-update-processor.cpp
+++ b/tests/update/test-prefix-update-processor.cpp
@@ -161,9 +161,12 @@
// no longer does face->put(*data) in publishData.
// Instead it does it in onInterest
ndn::Name lsaInterestName("/localhop/ndn/NLSR/LSA");
+ lsaInterestName.append(NameLsa::TYPE_STRING);
+
// The part after LSA is Chronosync getSession
lsaInterestName.append(sessionTime);
- lsaInterestName.appendNumber(nlsr.getSequencingManager().getCombinedSeqNo());
+ lsaInterestName.appendNumber(nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
+
shared_ptr<Interest> lsaInterest = make_shared<Interest>(lsaInterestName);
face.receive(*lsaInterest);
@@ -231,6 +234,7 @@
BOOST_AUTO_TEST_CASE(Basic)
{
+ uint64_t nameLsaSeqNoBeforeInterest = nlsr.getLsdb().getSequencingManager().getNameLsaSeq();
updateProcessor.enable();
// Advertise
@@ -252,8 +256,10 @@
BOOST_CHECK_EQUAL(namePrefixList.getNameList().front(), parameters.getName());
BOOST_CHECK(wasRoutingUpdatePublished());
+ BOOST_CHECK(nameLsaSeqNoBeforeInterest < nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
face.sentData.clear();
+ nameLsaSeqNoBeforeInterest = nlsr.getLsdb().getSequencingManager().getNameLsaSeq();
// Withdraw
ndn::Name withdrawCommand("/localhost/nlsr/prefix-update/withdraw");
@@ -268,6 +274,7 @@
BOOST_CHECK_EQUAL(namePrefixList.getSize(), 0);
BOOST_CHECK(wasRoutingUpdatePublished());
+ BOOST_CHECK(nameLsaSeqNoBeforeInterest < nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
}
BOOST_AUTO_TEST_CASE(DisabledAndEnabled)