From de907e17ff0afffa91d8ed35ccc7042876acf17e Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 25 Aug 2008 21:23:21 +0000 Subject: [PATCH] enables alerts earlier in test_swarm --- test/setup_transfer.cpp | 3 --- test/test_swarm.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/test/setup_transfer.cpp b/test/setup_transfer.cpp index 115702833..50bcc79d7 100644 --- a/test/setup_transfer.cpp +++ b/test/setup_transfer.cpp @@ -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 diff --git a/test/test_swarm.cpp b/test/test_swarm.cpp index 102026ea4..a17ac8802 100644 --- a/test/test_swarm.cpp +++ b/test/test_swarm.cpp @@ -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;