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()
