diff options
Diffstat (limited to 'tests/net_load_tests/clt.cpp')
-rw-r--r-- | tests/net_load_tests/clt.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/tests/net_load_tests/clt.cpp b/tests/net_load_tests/clt.cpp index 56089a4da..376d7ee53 100644 --- a/tests/net_load_tests/clt.cpp +++ b/tests/net_load_tests/clt.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2016, The Monero Project +// Copyright (c) 2014-2017, The Monero Project // // All rights reserved. // @@ -32,7 +32,7 @@ #include <chrono> #include <functional> #include <numeric> -#include <thread> +#include <boost/thread/thread.hpp> #include <vector> #include "gtest/gtest.h" @@ -44,10 +44,7 @@ #include "net_load_tests.h" -#include "../../contrib/otshell_utils/utils.hpp" - using namespace net_load_tests; -using namespace nOT::nUtils; namespace { @@ -194,7 +191,7 @@ namespace protected: virtual void SetUp() { - m_thread_count = (std::max)(min_thread_count, std::thread::hardware_concurrency() / 2); + m_thread_count = (std::max)(min_thread_count, boost::thread::hardware_concurrency() / 2); m_tcp_server.get_config_object().m_pcommands_handler = &m_commands_handler; m_tcp_server.get_config_object().m_invoke_timeout = CONNECTION_TIMEOUT; @@ -281,10 +278,10 @@ namespace void parallel_exec(const Func& func) { unit_test::call_counter properly_finished_threads; - std::vector<std::thread> threads(m_thread_count); + std::vector<boost::thread> threads(m_thread_count); for (size_t i = 0; i < threads.size(); ++i) { - threads[i] = std::thread([&, i] { + threads[i] = boost::thread([&, i] { call_func(i, func, 0); properly_finished_threads.inc(); }); @@ -632,10 +629,8 @@ int main(int argc, char** argv) { epee::debug::get_set_enable_assert(true, false); //set up logging options - epee::log_space::get_set_log_detalisation_level(true, LOG_LEVEL_0); - epee::log_space::log_singletone::add_logger(LOGGER_CONSOLE, NULL, NULL); + mlog_configure(mlog_get_default_log_path("net_load_tests_clt.log"), true); ::testing::InitGoogleTest(&argc, argv); - epee::net_utils::data_logger::get_instance().kill_instance(); return RUN_ALL_TESTS(); } |