security: use exponential backoff in CertificateFetcherFromNetwork
refs: #4718, #4712
Change-Id: I8def533528b82ea00096e9d87897acf31dff24a4
diff --git a/tests/unit-tests/security/v2/certificate-fetcher-from-network.t.cpp b/tests/unit-tests/security/v2/certificate-fetcher-from-network.t.cpp
index e4b1ec9..5a6b395 100644
--- a/tests/unit-tests/security/v2/certificate-fetcher-from-network.t.cpp
+++ b/tests/unit-tests/security/v2/certificate-fetcher-from-network.t.cpp
@@ -119,13 +119,15 @@
BOOST_FIXTURE_TEST_CASE_TEMPLATE(ValidateFailure, T, Failures, CertificateFetcherFromNetworkFixture<T>)
{
VALIDATE_FAILURE(this->data, "Should fail, as interests don't bring data");
- BOOST_CHECK_GT(this->face.sentInterests.size(), 2);
+ // first interest + 3 retries
+ BOOST_CHECK_EQUAL(this->face.sentInterests.size(), 4);
+
this->face.sentInterests.clear();
this->advanceClocks(1_h, 2); // expire validator caches
VALIDATE_FAILURE(this->interest, "Should fail, as interests don't bring data");
- BOOST_CHECK_GT(this->face.sentInterests.size(), 2);
+ BOOST_CHECK_EQUAL(this->face.sentInterests.size(), 4);
}
BOOST_AUTO_TEST_SUITE_END() // TestCertificateFetcherFromNetwork