fw: use dead Nonce list in pipelines
refs #1953
Change-Id: I0faef2a985b03fe96387c2e0181588713550b9ce
diff --git a/tests/daemon/table/dead-nonce-list.cpp b/tests/daemon/table/dead-nonce-list.cpp
index c8a59bb..970d537 100644
--- a/tests/daemon/table/dead-nonce-list.cpp
+++ b/tests/daemon/table/dead-nonce-list.cpp
@@ -41,14 +41,21 @@
const uint32_t nonce2 = 0x1f46372b;
DeadNonceList dnl;
-
+ BOOST_CHECK_EQUAL(dnl.size(), 0);
BOOST_CHECK_EQUAL(dnl.has(nameA, nonce1), false);
+
dnl.add(nameA, nonce1);
+ BOOST_CHECK_EQUAL(dnl.size(), 1);
BOOST_CHECK_EQUAL(dnl.has(nameA, nonce1), true);
BOOST_CHECK_EQUAL(dnl.has(nameA, nonce2), false);
BOOST_CHECK_EQUAL(dnl.has(nameB, nonce1), false);
}
+BOOST_AUTO_TEST_CASE(MinLifetime)
+{
+ BOOST_CHECK_THROW(DeadNonceList dnl(time::milliseconds::zero()), std::invalid_argument);
+}
+
/// A Fixture that periodically inserts Nonces
class PeriodicalInsertionFixture : public BaseFixture
{
@@ -100,6 +107,8 @@
BOOST_FIXTURE_TEST_CASE(Lifetime, PeriodicalInsertionFixture)
{
+ BOOST_CHECK_EQUAL(dnl.getLifetime(), LIFETIME);
+
LimitedIo limitedIo;
const int RATE = DeadNonceList::INITIAL_CAPACITY / 2;