enables alerts earlier in test_swarm

This commit is contained in:
Arvid Norberg 2008-08-25 21:23:21 +00:00
parent d2e5f3919d
commit de907e17ff
2 changed files with 4 additions and 7 deletions

View File

@ -267,9 +267,6 @@ setup_transfer(session* ses1, session* ses2, session* ses3
t = *torrent;
}
ses1->set_severity_level(alert::debug);
ses2->set_severity_level(alert::debug);
// they should not use the same save dir, because the
// file pool will complain if two torrents are trying to
// use the same files

View File

@ -49,8 +49,12 @@ void test_swarm()
using namespace libtorrent;
session ses1(fingerprint("LT", 0, 1, 0, 0), std::make_pair(48000, 49000));
ses1.set_alert_mask(alert::all_categories & ~alert::progress_notification);
session ses2(fingerprint("LT", 0, 1, 0, 0), std::make_pair(49000, 50000));
ses2.set_alert_mask(alert::all_categories & ~alert::progress_notification);
session ses3(fingerprint("LT", 0, 1, 0, 0), std::make_pair(50000, 51000));
ses3.set_alert_mask(alert::all_categories & ~alert::progress_notification);
// this is to avoid everything finish from a single peer
// immediately. To make the swarm actually connect all
@ -85,10 +89,6 @@ void test_swarm()
// test using piece sizes smaller than 16kB
boost::tie(tor1, tor2, tor3) = setup_transfer(&ses1, &ses2, &ses3, true, false, true, "_swarm", 8 * 1024);
ses1.set_alert_mask(alert::all_categories & ~alert::progress_notification);
ses2.set_alert_mask(alert::all_categories & ~alert::progress_notification);
ses3.set_alert_mask(alert::all_categories & ~alert::progress_notification);
float sum_dl_rate2 = 0.f;
float sum_dl_rate3 = 0.f;
int count_dl_rates2 = 0;