diff --git a/src/test/cpp/asyncappendertestcase.cpp b/src/test/cpp/asyncappendertestcase.cpp index 0b6cf7949..33b2f3717 100644 --- a/src/test/cpp/asyncappendertestcase.cpp +++ b/src/test/cpp/asyncappendertestcase.cpp @@ -246,14 +246,13 @@ class AsyncAppenderTestCase : public AppenderSkeletonTestCase std::vector threads; for ( int x = 0; x < threadCount; x++ ) { - std::thread thr([root, LEN]() + threads.emplace_back([root, LEN]() { for (size_t i = 0; i < LEN; i++) { LOG4CXX_DEBUG(root, "message" << i); } }); - threads.push_back( std::move(thr) ); } for ( auto& thr : threads ) diff --git a/src/test/cpp/net/telnetappendertestcase.cpp b/src/test/cpp/net/telnetappendertestcase.cpp index b7aebbe57..1268c227a 100644 --- a/src/test/cpp/net/telnetappendertestcase.cpp +++ b/src/test/cpp/net/telnetappendertestcase.cpp @@ -118,6 +118,7 @@ class TelnetAppenderTestCase : public AppenderSkeletonTestCase #endif LOG4CXX_INFO(root, "Hello, World " << i); } + appender->close(); } };