chunks: print summary by default
Introduce -q/--quiet option to suppress all output.
Change-Id: Ib529849cb1ca8975d11ce6689e2d88708291d1c4
Refs: #4421
diff --git a/tests/chunks/consumer.t.cpp b/tests/chunks/consumer.t.cpp
index 14c7036..3662f24 100644
--- a/tests/chunks/consumer.t.cpp
+++ b/tests/chunks/consumer.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2017, Regents of the University of California,
+ * Copyright (c) 2016-2018, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -66,7 +66,7 @@
util::DummyClientFace face;
output_test_stream output("");
- Consumer cons(security::v2::getAcceptAllValidator(), false, output);
+ Consumer cons(security::v2::getAcceptAllValidator(), output);
auto interest = makeInterest(name);
@@ -105,7 +105,7 @@
util::DummyClientFace face;
output_test_stream output("");
- Consumer cons(security::v2::getAcceptAllValidator(), false, output);
+ Consumer cons(security::v2::getAcceptAllValidator(), output);
auto interest = makeInterest(name);
std::vector<shared_ptr<Data>> dataStore;
@@ -197,7 +197,7 @@
{
boost::asio::io_service io;
util::DummyClientFace face(io);
- Consumer consumer(security::v2::getAcceptAllValidator(), false);
+ Consumer consumer(security::v2::getAcceptAllValidator());
Name prefix("/ndn/chunks/test");
auto discover = make_unique<DiscoverVersionDummy>(prefix, face, Options());
diff --git a/tests/chunks/pipeline-interests-aimd.t.cpp b/tests/chunks/pipeline-interests-aimd.t.cpp
index d235bb1..98ba9ea 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-2017, Regents of the University of California,
+ * Copyright (c) 2016-2018, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -36,12 +36,11 @@
using namespace ndn::tests;
-class PipelineInterestAimdFixture : public ndn::chunks::tests::PipelineInterestsFixture
+class PipelineInterestAimdFixture : public chunks::tests::PipelineInterestsFixture
{
public:
PipelineInterestAimdFixture()
- : PipelineInterestsFixture()
- , opt(makePipelineOptions())
+ : opt(makePipelineOptions())
, rttEstimator(makeRttEstimatorOptions())
{
createPipeline();
@@ -56,10 +55,12 @@
}
private:
- static PipelineInterestsAimdOptions
+ static PipelineInterestsAimd::Options
makePipelineOptions()
{
- PipelineInterestsAimdOptions pipelineOptions;
+ PipelineInterestsAimd::Options pipelineOptions;
+ pipelineOptions.isQuiet = true;
+ pipelineOptions.isVerbose = false;
pipelineOptions.disableCwa = false;
pipelineOptions.ignoreCongMarks = false;
pipelineOptions.resetCwndToInit = false;
@@ -83,7 +84,7 @@
}
protected:
- PipelineInterestsAimdOptions opt;
+ PipelineInterestsAimd::Options opt;
RttEstimator rttEstimator;
PipelineInterestsAimd* aimdPipeline;
static constexpr double MARGIN = 0.01;
diff --git a/tests/chunks/pipeline-interests-fixed-window.t.cpp b/tests/chunks/pipeline-interests-fixed-window.t.cpp
index ef3cfc5..c4d4aad 100644
--- a/tests/chunks/pipeline-interests-fixed-window.t.cpp
+++ b/tests/chunks/pipeline-interests-fixed-window.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2017, Regents of the University of California,
+ * Copyright (c) 2016-2018, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -35,30 +35,27 @@
class PipelineInterestFixedWindowFixture : public PipelineInterestsFixture
{
public:
- typedef PipelineInterestsFixedWindowOptions Options;
-
-public:
PipelineInterestFixedWindowFixture()
- : PipelineInterestsFixture()
- , opt(makeOptions())
+ : opt(makeOptions())
{
setPipeline(make_unique<PipelineInterestsFixedWindow>(face, PipelineInterestsFixedWindow::Options(opt)));
}
-protected:
- Options opt;
-
private:
- static Options
+ static PipelineInterestsFixedWindow::Options
makeOptions()
{
- Options options;
+ PipelineInterestsFixedWindow::Options options;
+ options.isQuiet = true;
options.isVerbose = false;
options.interestLifetime = time::seconds(1);
options.maxRetriesOnTimeoutOrNack = 3;
options.maxPipelineSize = 5;
return options;
}
+
+protected:
+ PipelineInterestsFixedWindow::Options opt;
};
BOOST_AUTO_TEST_SUITE(Chunks)