From c4b2682599b88923674f1e63ae30a510cb0bda92 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 1 Aug 2014 05:44:48 +0000 Subject: [PATCH] improve robustness of test_privacy and error messages of test_fast_extension --- test/test_fast_extension.cpp | 6 ++++-- test/test_privacy.cpp | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/test_fast_extension.cpp b/test/test_fast_extension.cpp index 2a872f516..657dfc276 100644 --- a/test/test_fast_extension.cpp +++ b/test/test_fast_extension.cpp @@ -52,7 +52,8 @@ int read_message(stream_socket& s, char* buffer) if (ec) { std::cout << time_now_string() << ": " << ec.message() << std::endl; - exit(1); + TEST_ERROR("read_message: " + ec.message()); + return 0; } char* ptr = buffer; int length = read_int32(ptr); @@ -62,7 +63,8 @@ int read_message(stream_socket& s, char* buffer) if (ec) { std::cout << time_now_string() << ": " << ec.message() << std::endl; - exit(1); + TEST_ERROR("read_message: " + ec.message()); + return 0; } return length; } diff --git a/test/test_privacy.cpp b/test/test_privacy.cpp index af04478d7..9ce626e35 100644 --- a/test/test_privacy.cpp +++ b/test/test_privacy.cpp @@ -104,6 +104,8 @@ session_proxy test_proxy(settings_pack::proxy_type_t proxy_type, int flags) sett.set_bool(settings_pack::announce_to_all_tiers, true); sett.set_bool(settings_pack::force_proxy, flags & force_proxy_mode); sett.set_int(settings_pack::alert_mask, alert_mask); + sett.set_bool(settings_pack::enable_upnp, false); + sett.set_bool(settings_pack::enable_natpmp, false); // since multiple sessions may exist simultaneously (because of the // pipelining of the tests) they actually need to use different ports