tests: sync common testing infrastructure with ndn-cxx and NFD
And upgrade waf to version 2.0.21
Change-Id: Id713e0f3035badd97ca7fc03f76e50085b9a266c
diff --git a/tests/chunks/consumer.t.cpp b/tests/chunks/consumer.t.cpp
index a2bd683..32e6914 100644
--- a/tests/chunks/consumer.t.cpp
+++ b/tests/chunks/consumer.t.cpp
@@ -28,6 +28,7 @@
#include "tools/chunks/catchunks/pipeline-interests.hpp"
#include "tests/test-common.hpp"
+#include "tests/io-fixture.hpp"
#include <ndn-cxx/security/validator-null.hpp>
#include <ndn-cxx/util/dummy-client-face.hpp>
@@ -151,10 +152,9 @@
bool isPipelineRunning = false;
};
-BOOST_FIXTURE_TEST_CASE(RunBasic, UnitTestTimeFixture)
+BOOST_FIXTURE_TEST_CASE(RunBasic, IoFixture)
{
- boost::asio::io_service io;
- util::DummyClientFace face(io);
+ util::DummyClientFace face(m_io);
Options options;
Consumer consumer(security::getAcceptAllValidator());
@@ -166,7 +166,7 @@
BOOST_CHECK_EQUAL(pipelinePtr->isPipelineRunning, false);
consumer.run(std::move(discover), std::move(pipeline));
- this->advanceClocks(io, 1_ms);
+ this->advanceClocks(1_ms);
BOOST_CHECK_EQUAL(face.sentInterests.size(), 0); // no discovery Interests are issued
BOOST_CHECK_EQUAL(pipelinePtr->isPipelineRunning, true);
diff --git a/tests/chunks/discover-version.t.cpp b/tests/chunks/discover-version.t.cpp
index 9c3a844..79315cc 100644
--- a/tests/chunks/discover-version.t.cpp
+++ b/tests/chunks/discover-version.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2019, Regents of the University of California,
+ * Copyright (c) 2016-2020, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -26,7 +26,8 @@
#include "tools/chunks/catchunks/discover-version.hpp"
#include "tests/test-common.hpp"
-#include "tests/identity-management-fixture.hpp"
+#include "tests/io-fixture.hpp"
+#include "tests/key-chain-fixture.hpp"
#include <ndn-cxx/metadata-object.hpp>
#include <ndn-cxx/util/dummy-client-face.hpp>
@@ -37,8 +38,7 @@
using namespace ndn::tests;
-class DiscoverVersionFixture : public UnitTestTimeFixture,
- public IdentityManagementFixture
+class DiscoverVersionFixture : public IoFixture, public KeyChainFixture
{
public:
void
@@ -56,14 +56,13 @@
});
discover->run();
- advanceClocks(io, 1_ns);
+ advanceClocks(1_ns);
}
protected:
const Name name = "/ndn/chunks/test";
const uint64_t version = 1449227841747;
- boost::asio::io_service io;
- util::DummyClientFace face{io};
+ util::DummyClientFace face{m_io};
Options opt;
unique_ptr<DiscoverVersion> discover;
optional<Name> discoveredName;
@@ -113,7 +112,7 @@
MetadataObject mobject;
mobject.setVersionedName(Name(name).appendVersion(version));
face.receive(mobject.makeData(lastInterest.getName(), m_keyChain));
- advanceClocks(io, 1_ns);
+ advanceClocks(1_ns);
BOOST_CHECK_EQUAL(discoveredVersion.value(), version);
}
@@ -163,11 +162,11 @@
// timeout or nack discovery Interests
for (int retries = 0; retries < opt.maxRetriesOnTimeoutOrNack * 2; ++retries) {
if (retries % 2 == 0) {
- advanceClocks(io, opt.interestLifetime);
+ advanceClocks(opt.interestLifetime);
}
else {
face.receive(makeNack(face.sentInterests.back(), lp::NackReason::DUPLICATE));
- advanceClocks(io, 1_ns);
+ advanceClocks(1_ns);
}
BOOST_CHECK_EQUAL(isDiscoveryFinished, false);
@@ -175,7 +174,7 @@
}
// timeout the last sent Interest
- advanceClocks(io, opt.interestLifetime);
+ advanceClocks(opt.interestLifetime);
// finish discovery process without a resolved version number
BOOST_CHECK_EQUAL(isDiscoveryFinished, true);
@@ -193,11 +192,11 @@
// timeout or nack discovery Interests
for (int retries = 0; retries < opt.maxRetriesOnTimeoutOrNack * 2; ++retries) {
if (retries % 2 == 0) {
- advanceClocks(io, opt.interestLifetime);
+ advanceClocks(opt.interestLifetime);
}
else {
face.receive(makeNack(face.sentInterests.back(), lp::NackReason::DUPLICATE));
- advanceClocks(io, 1_ns);
+ advanceClocks(1_ns);
}
BOOST_CHECK_EQUAL(isDiscoveryFinished, false);
@@ -208,7 +207,7 @@
MetadataObject mobject;
mobject.setVersionedName(Name(name).appendVersion(version));
face.receive(mobject.makeData(face.sentInterests.back().getName(), m_keyChain));
- advanceClocks(io, 1_ns);
+ advanceClocks(1_ns);
BOOST_CHECK_EQUAL(discoveredVersion.value(), version);
}
diff --git a/tests/chunks/pipeline-interests-aimd.t.cpp b/tests/chunks/pipeline-interests-aimd.t.cpp
index f38251a..feed933 100644
--- a/tests/chunks/pipeline-interests-aimd.t.cpp
+++ b/tests/chunks/pipeline-interests-aimd.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2019, Regents of the University of California,
+ * Copyright (c) 2016-2020, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -88,12 +88,12 @@
double preCwnd = pipeline->m_cwnd;
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(face.sentInterests.size(), 2);
for (uint64_t i = 0; i < nDataSegments - 1; ++i) {
face.receive(*makeDataWithSegment(i));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_CLOSE(pipeline->m_cwnd - preCwnd, 1, MARGIN);
preCwnd = pipeline->m_cwnd;
}
@@ -109,12 +109,12 @@
double preCwnd = pipeline->m_cwnd;
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(face.sentInterests.size(), 2);
for (uint64_t i = 0; i < pipeline->m_ssthresh; ++i) { // slow start
face.receive(*makeDataWithSegment(i));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
preCwnd = pipeline->m_cwnd;
}
@@ -122,7 +122,7 @@
for (uint64_t i = pipeline->m_ssthresh; i < nDataSegments - 1; ++i) { // congestion avoidance
face.receive(*makeDataWithSegment(i));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_CLOSE(pipeline->m_cwnd - preCwnd, opt.aiStep / floor(preCwnd), MARGIN);
preCwnd = pipeline->m_cwnd;
}
@@ -137,28 +137,28 @@
BOOST_REQUIRE_CLOSE(pipeline->m_cwnd, 2, MARGIN);
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(face.sentInterests.size(), 2);
// receive segment 0, 1, and 2
for (uint64_t i = 0; i < 3; ++i) {
face.receive(*makeDataWithSegment(i));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
}
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 3);
BOOST_CHECK_CLOSE(pipeline->m_cwnd, 4.25, MARGIN);
BOOST_CHECK_EQUAL(face.sentInterests.size(), 7); // request for segment 7 has been sent
- advanceClocks(io, time::milliseconds(100));
+ advanceClocks(time::milliseconds(100));
// receive segment 4
face.receive(*makeDataWithSegment(4));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// receive segment 5
face.receive(*makeDataWithSegment(5));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 5);
BOOST_CHECK_CLOSE(pipeline->m_cwnd, 4.75, MARGIN);
@@ -172,7 +172,7 @@
BOOST_CHECK_EQUAL(pipeline->m_nCongMarks, 0);
// timeout segment 3 & 6
- advanceClocks(io, time::milliseconds(150));
+ advanceClocks(time::milliseconds(150));
BOOST_CHECK_EQUAL(pipeline->m_nTimeouts, 2);
BOOST_CHECK_EQUAL(pipeline->m_nRetransmitted, 1);
BOOST_CHECK_EQUAL(pipeline->m_nLossDecr, 1);
@@ -184,7 +184,7 @@
// receive segment 6, retransmit 3
face.receive(*makeDataWithSegment(6));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 6);
BOOST_CHECK_CLOSE(pipeline->m_cwnd, 2.875, MARGIN); // congestion avoidance
@@ -205,13 +205,13 @@
BOOST_REQUIRE_CLOSE(pipeline->m_cwnd, 2, MARGIN);
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(face.sentInterests.size(), 2);
// receive segments 0 to 4
for (uint64_t i = 0; i < 5; ++i) {
face.receive(*makeDataWithSegment(i));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
}
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 5);
@@ -219,7 +219,7 @@
// receive segment 5 with congestion mark
face.receive(*makeDataWithSegmentAndCongMark(5));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 6);
BOOST_CHECK_CLOSE(pipeline->m_cwnd, 2.375, MARGIN); // window size drops to 1/2 of previous size
@@ -227,7 +227,7 @@
// receive the last segment with congestion mark
face.receive(*makeDataWithSegmentAndCongMark(nDataSegments - 1));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, nDataSegments);
BOOST_CHECK_CLOSE(pipeline->m_cwnd, 2.375, MARGIN); // conservative window adaption (window size should not decrease)
@@ -251,13 +251,13 @@
BOOST_REQUIRE_CLOSE(pipeline->m_cwnd, 2, MARGIN);
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(face.sentInterests.size(), 2);
// receive segments 0 to 4
for (uint64_t i = 0; i < 5; ++i) {
face.receive(*makeDataWithSegment(i));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
}
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 5);
@@ -265,7 +265,7 @@
// receive segment 5 with congestion mark
face.receive(*makeDataWithSegmentAndCongMark(5));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 6);
BOOST_CHECK_CLOSE(pipeline->m_cwnd, 2.375, MARGIN); // window size drops to 1/2 of previous size
@@ -273,7 +273,7 @@
// receive the last segment with congestion mark
face.receive(*makeDataWithSegmentAndCongMark(nDataSegments - 1));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, nDataSegments);
BOOST_CHECK_CLOSE(pipeline->m_cwnd, PipelineInterestsAdaptive::MIN_SSTHRESH,
@@ -298,13 +298,13 @@
BOOST_REQUIRE_CLOSE(pipeline->m_cwnd, 2, MARGIN);
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(face.sentInterests.size(), 2);
// receive segments 0 to 5
for (uint64_t i = 0; i < 6; ++i) {
face.receive(*makeDataWithSegment(i));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
}
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 6);
@@ -313,7 +313,7 @@
// receive the last segment with congestion mark
face.receive(*makeDataWithSegmentAndCongMark(nDataSegments - 1));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, nDataSegments);
BOOST_CHECK_CLOSE(pipeline->m_cwnd, 5.2, MARGIN); // window size increases
@@ -331,13 +331,13 @@
nDataSegments = 5;
pipeline->m_cwnd = 10.0;
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
face.receive(*makeDataWithSegment(0));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
face.receive(*makeDataWithSegment(1));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 2);
BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 10);
@@ -345,7 +345,7 @@
// receive a nack with NackReason::DUPLICATE for segment 1
auto nack1 = makeNack(face.sentInterests[1], lp::NackReason::DUPLICATE);
face.receive(nack1);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// nack1 is ignored
BOOST_CHECK_EQUAL(hasFailed, false);
@@ -355,7 +355,7 @@
// receive a nack with NackReason::CONGESTION for segment 2
auto nack2 = makeNack(face.sentInterests[2], lp::NackReason::CONGESTION);
face.receive(nack2);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// segment 2 is retransmitted
BOOST_CHECK_EQUAL(pipeline->m_retxCount[2], 1);
@@ -363,7 +363,7 @@
// receive a nack with NackReason::NONE for segment 3
auto nack3 = makeNack(face.sentInterests[3], lp::NackReason::NONE);
face.receive(nack3);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// Other types of Nack will trigger a failure
BOOST_CHECK_EQUAL(hasFailed, true);
@@ -375,11 +375,11 @@
nDataSegments = 4;
pipeline->m_cwnd = 4;
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// receive segment 0 without FinalBlockId
face.receive(*makeDataWithSegment(0, false));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// interests for segment 0 - 5 have been sent
BOOST_CHECK_EQUAL(face.sentInterests.size(), 6);
@@ -390,7 +390,7 @@
// receive segment 1 with FinalBlockId
face.receive(*makeDataWithSegment(1));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 2);
BOOST_CHECK_EQUAL(pipeline->m_hasFinalBlockId, true);
@@ -407,15 +407,15 @@
nDataSegments = 4;
pipeline->m_cwnd = 4;
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// receive segment 0 without FinalBlockId
face.receive(*makeDataWithSegment(0, false));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// receive segment 1 without FinalBlockId
face.receive(*makeDataWithSegment(1, false));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// interests for segment 0 - 7 have been sent
BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 8);
@@ -423,7 +423,7 @@
// receive nack with NackReason::NONE for segment 3
auto nack = makeNack(face.sentInterests[3], lp::NackReason::NONE);
face.receive(nack);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// error not triggered
// pending interests for segment > 3 haven been removed
@@ -432,7 +432,7 @@
// receive segment 2 with FinalBlockId
face.receive(*makeDataWithSegment(2));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// error triggered since segment 3 is part of the content
BOOST_CHECK_EQUAL(hasFailed, true);
@@ -447,15 +447,15 @@
nDataSegments = 4;
pipeline->m_cwnd = 4;
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// receive segment 0 without FinalBlockId
face.receive(*makeDataWithSegment(0, false));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// receive segment 1 without FinalBlockId
face.receive(*makeDataWithSegment(1, false));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// interests for segment 0 - 7 have been sent
BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 8);
@@ -463,7 +463,7 @@
// receive nack with NackReason::NONE for segment 4
auto nack = makeNack(face.sentInterests[4], lp::NackReason::NONE);
face.receive(nack);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// error not triggered
// pending interests for segment > 3 have been removed
@@ -472,17 +472,17 @@
// receive segment 2 with FinalBlockId
face.receive(*makeDataWithSegment(2));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// timeout segment 3
- advanceClocks(io, time::seconds(1));
+ advanceClocks(time::seconds(1));
// segment 3 is retransmitted
BOOST_CHECK_EQUAL(pipeline->m_retxCount[3], 1);
// receive segment 3
face.receive(*makeDataWithSegment(3));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(hasFailed, false);
}
@@ -495,15 +495,15 @@
nDataSegments = 3;
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// receive segment 0
face.receive(*makeDataWithSegment(0));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// receive segment 1
face.receive(*makeDataWithSegment(1));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(face.sentInterests.size(), 3);
@@ -513,7 +513,7 @@
BOOST_CHECK(it->second.state == SegmentState::FirstTimeSent);
// timeout segment 2 twice
- advanceClocks(io, time::milliseconds(400), 3);
+ advanceClocks(time::milliseconds(400), 3);
BOOST_CHECK_EQUAL(face.sentInterests.size(), 5);
@@ -527,7 +527,7 @@
// receive segment 2 the first time
face.receive(*makeDataWithSegment(2));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// check if segment 2 was erased from m_segmentInfo
it = pipeline->m_segmentInfo.find(2);
@@ -538,7 +538,7 @@
// receive segment 2 the second time
face.receive(*makeDataWithSegment(2));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// nothing changed
it = pipeline->m_segmentInfo.find(2);
@@ -582,10 +582,10 @@
nDataSegments = 1;
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
face.receive(*makeDataWithSegment(0));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_hasFinalBlockId, true);
BOOST_CHECK_EQUAL(pipeline->m_segmentInfo.size(), 0);
diff --git a/tests/chunks/pipeline-interests-cubic.t.cpp b/tests/chunks/pipeline-interests-cubic.t.cpp
index 51d5be2..fc53343 100644
--- a/tests/chunks/pipeline-interests-cubic.t.cpp
+++ b/tests/chunks/pipeline-interests-cubic.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2019, Regents of the University of California,
+ * Copyright (c) 2016-2020, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -87,12 +87,12 @@
double preCwnd = pipeline->m_cwnd;
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(face.sentInterests.size(), 2);
for (uint64_t i = 0; i < nDataSegments - 1; ++i) {
face.receive(*makeDataWithSegment(i));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_CLOSE(pipeline->m_cwnd - preCwnd, 1, MARGIN);
preCwnd = pipeline->m_cwnd;
}
@@ -107,28 +107,28 @@
BOOST_REQUIRE_CLOSE(pipeline->m_cwnd, 2, MARGIN);
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(face.sentInterests.size(), 2);
// receive segment 0, 1, and 2
for (uint64_t i = 0; i < 3; ++i) {
face.receive(*makeDataWithSegment(i));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
}
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 3);
BOOST_CHECK_CLOSE(pipeline->m_cwnd, 5, MARGIN);
BOOST_CHECK_EQUAL(face.sentInterests.size(), 8); // request for segment #7 has been sent
- advanceClocks(io, time::milliseconds(100));
+ advanceClocks(time::milliseconds(100));
// receive segment 4
face.receive(*makeDataWithSegment(4));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// receive segment 5
face.receive(*makeDataWithSegment(5));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 5);
BOOST_CHECK_CLOSE(pipeline->m_cwnd, 7.0, MARGIN);
@@ -142,7 +142,7 @@
BOOST_CHECK_EQUAL(pipeline->m_nCongMarks, 0);
// timeout segment 3 & 6
- advanceClocks(io, time::milliseconds(150));
+ advanceClocks(time::milliseconds(150));
BOOST_CHECK_EQUAL(pipeline->m_nTimeouts, 3);
BOOST_CHECK_EQUAL(pipeline->m_nRetransmitted, 3);
BOOST_CHECK_EQUAL(pipeline->m_nLossDecr, 1);
@@ -154,7 +154,7 @@
// receive segment 6, retransmit 3
face.receive(*makeDataWithSegment(6));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 6);
BOOST_CHECK_CLOSE(pipeline->m_cwnd, 4.9, MARGIN); // congestion avoidance
@@ -174,13 +174,13 @@
BOOST_REQUIRE_CLOSE(pipeline->m_cwnd, 2, MARGIN);
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(face.sentInterests.size(), 2);
// receive segments 0 to 4
for (uint64_t i = 0; i < 5; ++i) {
face.receive(*makeDataWithSegment(i));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
}
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 5);
@@ -188,7 +188,7 @@
// receive segment 5 with congestion mark
face.receive(*makeDataWithSegmentAndCongMark(5));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 6);
BOOST_CHECK_CLOSE(pipeline->m_cwnd, 4.9, MARGIN); // window size drops to 0.7x of previous size
@@ -196,7 +196,7 @@
// receive the last segment with congestion mark
face.receive(*makeDataWithSegmentAndCongMark(nDataSegments - 1));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, nDataSegments);
BOOST_CHECK_CLOSE(pipeline->m_cwnd, 4.9, MARGIN); // conservative window adaption (window size should not decrease)
@@ -219,13 +219,13 @@
BOOST_REQUIRE_CLOSE(pipeline->m_cwnd, 2, MARGIN);
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(face.sentInterests.size(), 2);
// receive segments 0 to 4
for (uint64_t i = 0; i < 5; ++i) {
face.receive(*makeDataWithSegment(i));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
}
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 5);
@@ -233,7 +233,7 @@
// receive segment 5 with congestion mark
face.receive(*makeDataWithSegmentAndCongMark(5));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 6);
BOOST_CHECK_CLOSE(pipeline->m_cwnd, 4.9, MARGIN); // window size drops to 0.7x of previous size
@@ -241,7 +241,7 @@
// receive the last segment with congestion mark
face.receive(*makeDataWithSegmentAndCongMark(nDataSegments - 1));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, nDataSegments);
BOOST_CHECK_CLOSE(pipeline->m_cwnd, 3.43, MARGIN); // window size should decrease, as cwa is disabled
@@ -264,13 +264,13 @@
BOOST_REQUIRE_CLOSE(pipeline->m_cwnd, 2, MARGIN);
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(face.sentInterests.size(), 2);
// receive segments 0 to 5
for (uint64_t i = 0; i < 6; ++i) {
face.receive(*makeDataWithSegment(i));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
}
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 6);
@@ -279,7 +279,7 @@
// receive the last segment with congestion mark
face.receive(*makeDataWithSegmentAndCongMark(nDataSegments - 1));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, nDataSegments);
BOOST_CHECK_CLOSE(pipeline->m_cwnd, 9.0, MARGIN); // window size increases
@@ -297,13 +297,13 @@
nDataSegments = 5;
pipeline->m_cwnd = 10.0;
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
face.receive(*makeDataWithSegment(0));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
face.receive(*makeDataWithSegment(1));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 2);
BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 10);
@@ -311,7 +311,7 @@
// receive a nack with NackReason::DUPLICATE for segment 1
auto nack1 = makeNack(face.sentInterests[1], lp::NackReason::DUPLICATE);
face.receive(nack1);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// nack1 is ignored
BOOST_CHECK_EQUAL(hasFailed, false);
@@ -321,7 +321,7 @@
// receive a nack with NackReason::CONGESTION for segment 2
auto nack2 = makeNack(face.sentInterests[2], lp::NackReason::CONGESTION);
face.receive(nack2);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// segment 2 is retransmitted
BOOST_CHECK_EQUAL(pipeline->m_retxCount[2], 1);
@@ -329,7 +329,7 @@
// receive a nack with NackReason::NONE for segment 3
auto nack3 = makeNack(face.sentInterests[3], lp::NackReason::NONE);
face.receive(nack3);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// Other types of Nack will trigger a failure
BOOST_CHECK_EQUAL(hasFailed, true);
@@ -341,11 +341,11 @@
nDataSegments = 4;
pipeline->m_cwnd = 4;
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// receive segment 0 without FinalBlockId
face.receive(*makeDataWithSegment(0, false));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// interests for segment 0 - 5 have been sent
BOOST_CHECK_EQUAL(face.sentInterests.size(), 6);
@@ -356,7 +356,7 @@
// receive segment 1 with FinalBlockId
face.receive(*makeDataWithSegment(1));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 2);
BOOST_CHECK_EQUAL(pipeline->m_hasFinalBlockId, true);
@@ -373,15 +373,15 @@
nDataSegments = 4;
pipeline->m_cwnd = 4;
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// receive segment 0 without FinalBlockId
face.receive(*makeDataWithSegment(0, false));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// receive segment 1 without FinalBlockId
face.receive(*makeDataWithSegment(1, false));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// interests for segment 0 - 7 have been sent
BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 8);
@@ -389,7 +389,7 @@
// receive nack with NackReason::NONE for segment 3
auto nack = makeNack(face.sentInterests[3], lp::NackReason::NONE);
face.receive(nack);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// error not triggered
// pending interests for segment > 3 haven been removed
@@ -398,7 +398,7 @@
// receive segment 2 with FinalBlockId
face.receive(*makeDataWithSegment(2));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// error triggered since segment 3 is part of the content
BOOST_CHECK_EQUAL(hasFailed, true);
@@ -413,15 +413,15 @@
nDataSegments = 4;
pipeline->m_cwnd = 4;
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// receive segment 0 without FinalBlockId
face.receive(*makeDataWithSegment(0, false));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// receive segment 1 without FinalBlockId
face.receive(*makeDataWithSegment(1, false));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// interests for segment 0 - 7 have been sent
BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 8);
@@ -429,7 +429,7 @@
// receive nack with NackReason::NONE for segment 4
auto nack = makeNack(face.sentInterests[4], lp::NackReason::NONE);
face.receive(nack);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// error not triggered
// pending interests for segment > 3 have been removed
@@ -438,17 +438,17 @@
// receive segment 2 with FinalBlockId
face.receive(*makeDataWithSegment(2));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// timeout segment 3
- advanceClocks(io, time::seconds(1));
+ advanceClocks(time::seconds(1));
// segment 3 is retransmitted
BOOST_CHECK_EQUAL(pipeline->m_retxCount[3], 1);
// receive segment 3
face.receive(*makeDataWithSegment(3));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(hasFailed, false);
}
@@ -461,15 +461,15 @@
nDataSegments = 3;
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// receive segment 0
face.receive(*makeDataWithSegment(0));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// receive segment 1
face.receive(*makeDataWithSegment(1));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(face.sentInterests.size(), 3);
@@ -479,7 +479,7 @@
BOOST_CHECK(it->second.state == SegmentState::FirstTimeSent);
// timeout segment 2 twice
- advanceClocks(io, time::milliseconds(400), 3);
+ advanceClocks(time::milliseconds(400), 3);
BOOST_CHECK_EQUAL(face.sentInterests.size(), 5);
@@ -493,7 +493,7 @@
// receive segment 2 the first time
face.receive(*makeDataWithSegment(2));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// check if segment 2 was erased from m_segmentInfo
it = pipeline->m_segmentInfo.find(2);
@@ -504,7 +504,7 @@
// receive segment 2 the second time
face.receive(*makeDataWithSegment(2));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
// nothing changed
it = pipeline->m_segmentInfo.find(2);
@@ -548,10 +548,10 @@
nDataSegments = 1;
run(name);
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
face.receive(*makeDataWithSegment(0));
- advanceClocks(io, time::nanoseconds(1));
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_hasFinalBlockId, true);
BOOST_CHECK_EQUAL(pipeline->m_segmentInfo.size(), 0);
diff --git a/tests/chunks/pipeline-interests-fixed.t.cpp b/tests/chunks/pipeline-interests-fixed.t.cpp
index f4979a2..872fe4e 100644
--- a/tests/chunks/pipeline-interests-fixed.t.cpp
+++ b/tests/chunks/pipeline-interests-fixed.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2019, Regents of the University of California,
+ * Copyright (c) 2016-2020, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -67,12 +67,12 @@
BOOST_ASSERT(nDataSegments > opt.maxPipelineSize);
run(name);
- advanceClocks(io, time::nanoseconds(1), 1);
+ advanceClocks(time::nanoseconds(1));
BOOST_REQUIRE_EQUAL(face.sentInterests.size(), opt.maxPipelineSize);
for (uint64_t i = 0; i < nDataSegments - 1; ++i) {
face.receive(*makeDataWithSegment(i));
- advanceClocks(io, time::nanoseconds(1), 1);
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, i + 1);
if (i < nDataSegments - opt.maxPipelineSize) {
@@ -92,7 +92,7 @@
BOOST_CHECK_EQUAL(hasFailed, false);
- advanceClocks(io, ndn::DEFAULT_INTEREST_LIFETIME, opt.maxRetriesOnTimeoutOrNack + 1);
+ advanceClocks(ndn::DEFAULT_INTEREST_LIFETIME, opt.maxRetriesOnTimeoutOrNack + 1);
BOOST_CHECK_EQUAL(hasFailed, true);
}
@@ -102,11 +102,11 @@
BOOST_ASSERT(nDataSegments > opt.maxPipelineSize);
run(name);
- advanceClocks(io, time::nanoseconds(1), 1);
+ advanceClocks(time::nanoseconds(1));
BOOST_REQUIRE_EQUAL(face.sentInterests.size(), opt.maxPipelineSize);
for (int i = 0; i < opt.maxRetriesOnTimeoutOrNack; ++i) {
- advanceClocks(io, opt.interestLifetime, 1);
+ advanceClocks(opt.interestLifetime);
BOOST_REQUIRE_EQUAL(face.sentInterests.size(), opt.maxPipelineSize * (i + 2));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 0);
@@ -117,7 +117,7 @@
}
}
- advanceClocks(io, opt.interestLifetime, 1);
+ advanceClocks(opt.interestLifetime);
BOOST_CHECK_EQUAL(hasFailed, true);
}
@@ -130,23 +130,23 @@
BOOST_ASSERT(nDataSegments > opt.maxPipelineSize);
run(name);
- advanceClocks(io, time::nanoseconds(1), 1);
+ advanceClocks(time::nanoseconds(1));
BOOST_REQUIRE_EQUAL(face.sentInterests.size(), opt.maxPipelineSize);
// send a single segment for each pipeline element but not the first element
- advanceClocks(io, opt.interestLifetime, 1);
+ advanceClocks(opt.interestLifetime);
for (uint64_t i = 1; i < opt.maxPipelineSize; ++i) {
face.receive(*makeDataWithSegment(i));
- advanceClocks(io, time::nanoseconds(1), 1);
+ advanceClocks(time::nanoseconds(1));
}
// send a single data packet for each pipeline element
- advanceClocks(io, opt.interestLifetime, opt.maxRetriesOnTimeoutOrNack - 1);
+ advanceClocks(opt.interestLifetime, opt.maxRetriesOnTimeoutOrNack - 1);
for (uint64_t i = 0; i < opt.maxPipelineSize; ++i) {
face.receive(*makeDataWithSegment(opt.maxPipelineSize + i));
- advanceClocks(io, time::nanoseconds(1), 1);
+ advanceClocks(time::nanoseconds(1));
}
- advanceClocks(io, opt.interestLifetime, 1);
+ advanceClocks(opt.interestLifetime);
size_t interestAfterFailure = face.sentInterests.size();
@@ -154,14 +154,14 @@
BOOST_CHECK_EQUAL(hasFailed, true);
// these new segments should not generate new interests
- advanceClocks(io, opt.interestLifetime, 1);
+ advanceClocks(opt.interestLifetime);
for (uint64_t i = 0; i < opt.maxPipelineSize; ++i) {
face.receive(*makeDataWithSegment(opt.maxPipelineSize * 2 + i - 1));
- advanceClocks(io, time::nanoseconds(1), 1);
+ advanceClocks(time::nanoseconds(1));
}
// no more interests after a failure
- advanceClocks(io, opt.interestLifetime, opt.maxRetriesOnTimeoutOrNack);
+ advanceClocks(opt.interestLifetime, opt.maxRetriesOnTimeoutOrNack);
BOOST_CHECK_EQUAL(interestAfterFailure, face.sentInterests.size());
BOOST_CHECK_EQUAL(face.getNPendingInterests(), 0);
}
@@ -175,13 +175,13 @@
BOOST_ASSERT(nDataSegments > opt.maxPipelineSize);
run(name);
- advanceClocks(io, time::nanoseconds(1), 1);
+ advanceClocks(time::nanoseconds(1));
BOOST_REQUIRE_EQUAL(face.sentInterests.size(), opt.maxPipelineSize);
- advanceClocks(io, opt.interestLifetime, 1);
+ advanceClocks(opt.interestLifetime);
for (uint64_t i = 2; i < opt.maxPipelineSize; ++i) {
face.receive(*makeDataWithSegment(i, false));
- advanceClocks(io, time::nanoseconds(1), 1);
+ advanceClocks(time::nanoseconds(1));
const auto& lastInterest = face.sentInterests.back();
BOOST_CHECK_EQUAL(getSegmentFromPacket(lastInterest), opt.maxPipelineSize + i - 2);
@@ -195,7 +195,7 @@
// all the pipeline elements are two retries near the timeout error, but not the
// second (segment #1) that is only one retry near the timeout
- advanceClocks(io, opt.interestLifetime, opt.maxRetriesOnTimeoutOrNack - 1);
+ advanceClocks(opt.interestLifetime, opt.maxRetriesOnTimeoutOrNack - 1);
BOOST_CHECK_EQUAL(hasFailed, false);
// data for the first pipeline element (segment #0)
@@ -210,10 +210,10 @@
else {
face.receive(*makeDataWithSegment(i, false));
}
- advanceClocks(io, time::nanoseconds(1), 1);
+ advanceClocks(time::nanoseconds(1));
}
// timeout for the second pipeline element (segment #1), this should trigger an error
- advanceClocks(io, opt.interestLifetime, 1);
+ advanceClocks(opt.interestLifetime);
BOOST_CHECK_EQUAL(pipeline->m_nReceived, nDataSegments - 1);
BOOST_CHECK_EQUAL(hasFailed, true);
@@ -228,10 +228,10 @@
BOOST_ASSERT(nDataSegments > opt.maxPipelineSize);
run(name);
- advanceClocks(io, time::nanoseconds(1), 1);
+ advanceClocks(time::nanoseconds(1));
BOOST_REQUIRE_EQUAL(face.sentInterests.size(), opt.maxPipelineSize);
- advanceClocks(io, opt.interestLifetime, 1);
+ advanceClocks(opt.interestLifetime);
// nack for the first pipeline element (segment #0)
auto nack = make_shared<lp::Nack>(face.sentInterests[opt.maxPipelineSize]);
@@ -240,13 +240,13 @@
BOOST_CHECK_EQUAL(hasFailed, false);
// timeout for all the pipeline elements, but not the first (segment #0)
- advanceClocks(io, opt.interestLifetime, opt.maxRetriesOnTimeoutOrNack);
+ advanceClocks(opt.interestLifetime, opt.maxRetriesOnTimeoutOrNack);
BOOST_CHECK_EQUAL(hasFailed, false);
// data for the first pipeline element (segment #0), this should trigger an error because the
// other pipeline elements failed
face.receive(*makeDataWithSegment(0, false));
- advanceClocks(io, time::nanoseconds(1), 1);
+ advanceClocks(time::nanoseconds(1));
BOOST_CHECK_EQUAL(pipeline->m_nReceived, 1);
BOOST_CHECK_EQUAL(hasFailed, true);
@@ -258,7 +258,7 @@
BOOST_ASSERT(nDataSegments > opt.maxPipelineSize);
run(name);
- advanceClocks(io, time::nanoseconds(1), 1);
+ advanceClocks(time::nanoseconds(1));
BOOST_REQUIRE_EQUAL(face.sentInterests.size(), opt.maxPipelineSize);
// send nack for all the pipeline elements first interest
@@ -266,7 +266,7 @@
auto nack = make_shared<lp::Nack>(face.sentInterests[i]);
nack->setReason(lp::NackReason::CONGESTION);
face.receive(*nack);
- advanceClocks(io, time::nanoseconds(1), 1);
+ advanceClocks(time::nanoseconds(1));
}
// send nack for all the pipeline elements interests after the first
@@ -275,7 +275,7 @@
if (backoffTime > DataFetcher::MAX_CONGESTION_BACKOFF_TIME)
backoffTime = DataFetcher::MAX_CONGESTION_BACKOFF_TIME;
- advanceClocks(io, backoffTime, 1);
+ advanceClocks(backoffTime);
BOOST_REQUIRE_EQUAL(face.sentInterests.size(), opt.maxPipelineSize * (i +1));
// A single retry for every pipeline element
@@ -288,7 +288,7 @@
auto nack = make_shared<lp::Nack>(face.sentInterests[(opt.maxPipelineSize * i) + j]);
nack->setReason(lp::NackReason::CONGESTION);
face.receive(*nack);
- advanceClocks(io, time::nanoseconds(1), 1);
+ advanceClocks(time::nanoseconds(1));
}
}
diff --git a/tests/chunks/pipeline-interests-fixture.hpp b/tests/chunks/pipeline-interests-fixture.hpp
index dc7eabd..643047a 100644
--- a/tests/chunks/pipeline-interests-fixture.hpp
+++ b/tests/chunks/pipeline-interests-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2019, Regents of the University of California,
+ * Copyright (c) 2016-2020, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -32,6 +32,7 @@
#include "tools/chunks/catchunks/pipeline-interests.hpp"
#include "tests/test-common.hpp"
+#include "tests/io-fixture.hpp"
#include <ndn-cxx/util/dummy-client-face.hpp>
@@ -41,7 +42,7 @@
using namespace ndn::tests;
-class PipelineInterestsFixture : public UnitTestTimeFixture
+class PipelineInterestsFixture : public IoFixture
{
protected:
void
@@ -78,8 +79,7 @@
}
protected:
- boost::asio::io_service io;
- util::DummyClientFace face{io};
+ util::DummyClientFace face{m_io};
Name name{"/ndn/chunks/test"};
uint64_t nDataSegments = 0;
bool hasFailed = false;
diff --git a/tests/chunks/producer.t.cpp b/tests/chunks/producer.t.cpp
index 6b46320..6934fa4 100644
--- a/tests/chunks/producer.t.cpp
+++ b/tests/chunks/producer.t.cpp
@@ -26,7 +26,7 @@
#include "tools/chunks/putchunks/producer.hpp"
#include "tests/test-common.hpp"
-#include "tests/identity-management-fixture.hpp"
+#include "tests/key-chain-fixture.hpp"
#include <ndn-cxx/metadata-object.hpp>
#include <ndn-cxx/security/pib/identity.hpp>
@@ -42,7 +42,7 @@
using namespace ndn::tests;
-class ProducerFixture : public IdentityManagementFixture
+class ProducerFixture : public KeyChainFixture
{
protected:
ProducerFixture()