]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3615] Restore default logging config for the tests which alter it.
authorMarcin Siodelski <marcin@isc.org>
Wed, 15 Oct 2014 09:47:31 +0000 (11:47 +0200)
committerMarcin Siodelski <marcin@isc.org>
Wed, 15 Oct 2014 09:47:31 +0000 (11:47 +0200)
src/bin/d2/tests/bundy_d2_controller_unittests.cc
src/bin/d2/tests/d2_controller_unittests.cc
src/bin/d2/tests/d_controller_unittests.cc
src/bin/d2/tests/d_test_stubs.h

index e43ebff9fbb0fb442a8f34e0eab060784131e49c..02ddbe9488979d40fd63902d631e22d5c7fa0094 100644 (file)
@@ -48,9 +48,6 @@ public:
     BundyD2ControllerTest() : DControllerTest(D2Controller::instance) {
     }
 
-    /// @brief Destructor
-    ~BundyD2ControllerTest() {
-    }
 };
 
 /// @brief Basic Controller instantiation testing.
index a43a0953d119a85c2b409998058cf72e2dcd5e14..9b9c49b94e056d0b02c5c59182d5ac9fa32a0a75 100644 (file)
@@ -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
index c10d636104e41da965b5d7e695a6e70a1d762e32..3e5faa810036876d7709991d4d385168e313fa80 100644 (file)
@@ -41,9 +41,6 @@ public:
                                                   getController());
     }
 
-    virtual ~DStubControllerTest() {
-    }
-
     DStubControllerPtr controller_;
 };
 
index 5e658ed274f701fb7623f9322faa32cdca489c29..f45b8fc35e415a45512acbec3b9b1f0ce1e600ff 100644 (file)
@@ -23,6 +23,8 @@
 #include <d2/d_controller.h>
 #include <d2/d_cfg_mgr.h>
 
+#include <log/logger_support.h>
+
 #include <boost/date_time/posix_time/posix_time.hpp>
 
 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();
         }