Small correction with PIT (was correct, but now it is slightly better)
Another correction of scheduler test
diff --git a/model/sync-interest-table.cc b/model/sync-interest-table.cc
index 3a08fbd..703eded 100644
--- a/model/sync-interest-table.cc
+++ b/model/sync-interest-table.cc
@@ -32,7 +32,7 @@
SyncInterestTable::SyncInterestTable ()
{
- m_scheduler.schedule (posix_time::seconds (m_checkPeriod),
+ m_scheduler.schedule (posix_time::seconds (4),
bind (&SyncInterestTable::expireInterests, this),
0);
}
@@ -44,6 +44,7 @@
vector<string>
SyncInterestTable::fetchAll ()
{
+ expireInterests ();
recursive_mutex::scoped_lock lock (m_mutex);
vector<string> entries;
@@ -100,9 +101,10 @@
while (it != m_table.end())
{
time_t timestamp = it->second;
+ _LOG_DEBUG ("expireInterests (): " << timestamp << ", " << currentTime);
if (currentTime - timestamp > m_checkPeriod)
{
- it = m_table.erase(it);
+ it = m_table.erase (it);
count ++;
}
else
@@ -111,7 +113,7 @@
_LOG_DEBUG ("expireInterests (): expired " << count);
- m_scheduler.schedule (posix_time::seconds (m_checkPeriod),
+ m_scheduler.schedule (posix_time::seconds (4),
bind (&SyncInterestTable::expireInterests, this),
0);
}