disable some redundant features in tests to make them not interfere with the test itself

This commit is contained in:
arvidn 2015-06-07 17:54:08 -04:00
parent 72d3bc0b8e
commit 3f3b7d494c
3 changed files with 14 additions and 6 deletions

View File

@ -392,6 +392,10 @@ boost::shared_ptr<torrent_info> setup_peer(tcp::socket& s, sha1_hash& ih
settings_pack sett; settings_pack sett;
sett.set_str(settings_pack::listen_interfaces, "0.0.0.0:48900"); sett.set_str(settings_pack::listen_interfaces, "0.0.0.0:48900");
sett.set_int(settings_pack::alert_mask, alert::all_categories); sett.set_int(settings_pack::alert_mask, alert::all_categories);
sett.set_bool(settings_pack::enable_upnp, false);
sett.set_bool(settings_pack::enable_natpmp, false);
sett.set_bool(settings_pack::enable_lsd, false);
sett.set_bool(settings_pack::enable_dht, false);
ses.reset(new lt::session(sett, session::add_default_plugins)); ses.reset(new lt::session(sett, session::add_default_plugins));
error_code ec; error_code ec;

View File

@ -43,7 +43,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include "test.hpp" #include "test.hpp"
#include "setup_transfer.hpp" #include "setup_transfer.hpp"
#include "udp_tracker.hpp"
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>
@ -99,12 +98,7 @@ void test_transfer(settings_pack const& sett)
// using a reconnect time > 0 will just add // using a reconnect time > 0 will just add
// to the time it will take to complete the test // to the time it will take to complete the test
pack.set_int(settings_pack::min_reconnect_time, 0); pack.set_int(settings_pack::min_reconnect_time, 0);
pack.set_int(settings_pack::stop_tracker_timeout, 1);
pack.set_bool(settings_pack::announce_to_all_trackers, true);
pack.set_bool(settings_pack::announce_to_all_tiers, true);
// make sure we announce to both http and udp trackers
pack.set_bool(settings_pack::prefer_udp_trackers, false);
pack.set_bool(settings_pack::enable_outgoing_utp, false); pack.set_bool(settings_pack::enable_outgoing_utp, false);
pack.set_bool(settings_pack::enable_incoming_utp, false); pack.set_bool(settings_pack::enable_incoming_utp, false);
pack.set_int(settings_pack::alert_mask, mask); pack.set_int(settings_pack::alert_mask, mask);
@ -114,6 +108,11 @@ void test_transfer(settings_pack const& sett)
pack.set_bool(settings_pack::allow_multiple_connections_per_ip, false); pack.set_bool(settings_pack::allow_multiple_connections_per_ip, false);
pack.set_int(settings_pack::unchoke_slots_limit, 8); pack.set_int(settings_pack::unchoke_slots_limit, 8);
pack.set_bool(settings_pack::enable_upnp, false);
pack.set_bool(settings_pack::enable_natpmp, false);
pack.set_bool(settings_pack::enable_lsd, false);
pack.set_bool(settings_pack::enable_dht, false);
ses1.apply_settings(pack); ses1.apply_settings(pack);
ses2.apply_settings(pack); ses2.apply_settings(pack);

View File

@ -154,6 +154,11 @@ void test_transfer(int proxy_type, settings_pack const& sett
pack.set_str(settings_pack::listen_interfaces, "0.0.0.0:48075"); pack.set_str(settings_pack::listen_interfaces, "0.0.0.0:48075");
pack.set_int(settings_pack::alert_mask, mask); pack.set_int(settings_pack::alert_mask, mask);
pack.set_bool(settings_pack::enable_upnp, false);
pack.set_bool(settings_pack::enable_natpmp, false);
pack.set_bool(settings_pack::enable_lsd, false);
pack.set_bool(settings_pack::enable_dht, false);
lt::session ses1(pack); lt::session ses1(pack);
pack.set_str(settings_pack::listen_interfaces, "0.0.0.0:49075"); pack.set_str(settings_pack::listen_interfaces, "0.0.0.0:49075");