aboutsummaryrefslogtreecommitdiff
path: root/tests/net_load_tests/clt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/net_load_tests/clt.cpp')
-rw-r--r--tests/net_load_tests/clt.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/net_load_tests/clt.cpp b/tests/net_load_tests/clt.cpp
index 735f3658b..95702e1a8 100644
--- a/tests/net_load_tests/clt.cpp
+++ b/tests/net_load_tests/clt.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, The Monero Project
+// Copyright (c) 2014-2015, The Monero Project
//
// All rights reserved.
//
@@ -44,7 +44,10 @@
#include "net_load_tests.h"
+#include "../../contrib/otshell_utils/utils.hpp"
+
using namespace net_load_tests;
+using namespace nOT::nUtils;
namespace
{
@@ -183,6 +186,11 @@ namespace
class net_load_test_clt : public ::testing::Test
{
+ public:
+ net_load_test_clt()
+ : m_tcp_server(epee::net_utils::e_connection_type_RPC) // RPC disables network limit for unit tests
+ {
+ }
protected:
virtual void SetUp()
{
@@ -234,7 +242,7 @@ namespace
{
// Stop server
test_levin_commands_handler commands_handler;
- test_tcp_server tcp_server;
+ test_tcp_server tcp_server(epee::net_utils::e_connection_type_NET);
tcp_server.get_config_object().m_pcommands_handler = &commands_handler;
tcp_server.get_config_object().m_invoke_timeout = CONNECTION_TIMEOUT;
@@ -620,6 +628,8 @@ TEST_F(net_load_test_clt, permament_open_and_close_and_connections_closed_by_ser
ASSERT_EQ(RESERVED_CONN_CNT, m_tcp_server.get_config_object().get_connections_count());
}
+unsigned int epee::g_test_dbg_lock_sleep = 0;
+
int main(int argc, char** argv)
{
epee::debug::get_set_enable_assert(true, false);
@@ -628,5 +638,6 @@ int main(int argc, char** argv)
epee::log_space::log_singletone::add_logger(LOGGER_CONSOLE, NULL, NULL);
::testing::InitGoogleTest(&argc, argv);
+ epee::net_utils::data_logger::get_instance().kill_instance();
return RUN_ALL_TESTS();
}