rib: delete incorrect assertion in AutoPrefixPropagator::afterEraseRibEntry
Change-Id: Ie78675055317e5297174447ce4782c5e0fafd760 refs: #3362
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/**
|
||||
* Copyright (c) 2014-2015, Regents of the University of California,
|
||||
* Copyright (c) 2014-2016, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -176,7 +176,8 @@ AutoPrefixPropagator::afterInsertRibEntry(const Name& prefix)
|
||||
|
||||
auto entryIt = m_propagatedEntries.find(propagateParameters.parameters.getName());
|
||||
if (entryIt != m_propagatedEntries.end()) {
|
||||
BOOST_ASSERT(!entryIt->second.isNew());
|
||||
// in addition to PROPAGATED and PROPAGATE_FAIL, the state may also be NEW,
|
||||
// if its propagation was suspended because there was no connectivity to the Hub.
|
||||
NFD_LOG_INFO("prefix has already been propagated: "
|
||||
<< propagateParameters.parameters.getName());
|
||||
return;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/**
|
||||
* Copyright (c) 2014-2015, Regents of the University of California,
|
||||
* Copyright (c) 2014-2016, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -421,6 +421,23 @@ BOOST_AUTO_TEST_CASE(NoHubConnectivity)
|
||||
BOOST_CHECK(m_requests.empty());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(ProcessSuspendedEntries)
|
||||
{
|
||||
BOOST_REQUIRE(addIdentity("/test/A"));
|
||||
|
||||
BOOST_REQUIRE(insertEntryToRib("/test/A/app1"));
|
||||
BOOST_REQUIRE(insertEntryToRib("/test/A/app2"));
|
||||
BOOST_CHECK(m_requests.empty()); // no propagation because no hub is connected
|
||||
BOOST_CHECK_EQUAL(m_entries.size(), 1); // /test/A was suspended
|
||||
|
||||
BOOST_REQUIRE(eraseEntryFromRib("/test/A/app2"));
|
||||
BOOST_CHECK_EQUAL(m_entries.size(), 1); // /test/A was kept for app1
|
||||
|
||||
// repeat the scenario that leads to BUG 3362.
|
||||
// ensure there is no improper assertion.
|
||||
BOOST_REQUIRE(insertEntryToRib("/test/A/app2"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(PropagatedEntryExists)
|
||||
{
|
||||
connectToHub();
|
||||
|
||||
Reference in New Issue
Block a user