From: Marcin Siodelski Date: Wed, 15 Oct 2014 09:47:31 +0000 (+0200) Subject: [3615] Restore default logging config for the tests which alter it. X-Git-Tag: trac3162a_base~6^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a1e376727cbee1fc4b8ef93825c136abd8bb54b7;p=thirdparty%2Fkea.git [3615] Restore default logging config for the tests which alter it. --- diff --git a/src/bin/d2/tests/bundy_d2_controller_unittests.cc b/src/bin/d2/tests/bundy_d2_controller_unittests.cc index e43ebff9fb..02ddbe9488 100644 --- a/src/bin/d2/tests/bundy_d2_controller_unittests.cc +++ b/src/bin/d2/tests/bundy_d2_controller_unittests.cc @@ -48,9 +48,6 @@ public: BundyD2ControllerTest() : DControllerTest(D2Controller::instance) { } - /// @brief Destructor - ~BundyD2ControllerTest() { - } }; /// @brief Basic Controller instantiation testing. diff --git a/src/bin/d2/tests/d2_controller_unittests.cc b/src/bin/d2/tests/d2_controller_unittests.cc index a43a0953d1..9b9c49b94e 100644 --- a/src/bin/d2/tests/d2_controller_unittests.cc +++ b/src/bin/d2/tests/d2_controller_unittests.cc @@ -49,10 +49,6 @@ public: D2ControllerTest() : DControllerTest(D2Controller::instance) { } - /// @brief Destructor - ~D2ControllerTest() { - } - /// @brief Fetches the D2Controller's D2Process /// /// @return A pointer to the process which may be null if it has not yet diff --git a/src/bin/d2/tests/d_controller_unittests.cc b/src/bin/d2/tests/d_controller_unittests.cc index c10d636104..3e5faa8100 100644 --- a/src/bin/d2/tests/d_controller_unittests.cc +++ b/src/bin/d2/tests/d_controller_unittests.cc @@ -41,9 +41,6 @@ public: getController()); } - virtual ~DStubControllerTest() { - } - DStubControllerPtr controller_; }; diff --git a/src/bin/d2/tests/d_test_stubs.h b/src/bin/d2/tests/d_test_stubs.h index 5e658ed274..f45b8fc35e 100644 --- a/src/bin/d2/tests/d_test_stubs.h +++ b/src/bin/d2/tests/d_test_stubs.h @@ -23,6 +23,8 @@ #include #include +#include + #include using namespace boost::posix_time; @@ -346,6 +348,11 @@ public: /// Note the controller singleton is destroyed. This is essential to ensure /// a clean start between tests. virtual ~DControllerTest() { + // Some unit tests update the logging configuration which has a side + // effect that all subsequent tests print the output to stdout. This + // is to ensure that the logging settings are back to default. + isc::log::setDefaultLoggingOutput(); + if (write_timer_) { write_timer_->cancel(); }