From 242967a64dc42c24cd5164a339590d589109e526 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 30 Apr 2009 01:44:50 +0000 Subject: [PATCH] test fixes --- test/test_primitives.cpp | 4 +++- test/test_transfer.cpp | 3 +-- test/test_web_seed.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/test_primitives.cpp b/test/test_primitives.cpp index e8301ba2d..ceb32e81c 100644 --- a/test/test_primitives.cpp +++ b/test/test_primitives.cpp @@ -660,8 +660,10 @@ int test_main() TEST_CHECK(!is_local(address::from_string("14.14.251.63", ec))); TEST_CHECK(is_loopback(address::from_string("127.0.0.1", ec))); if (supports_ipv6()) + { TEST_CHECK(is_loopback(address::from_string("::1", ec))); - TEST_CHECK(is_any(address_v6::any())); + TEST_CHECK(is_any(address_v6::any())); + } TEST_CHECK(is_any(address_v4::any())); TEST_CHECK(!is_any(address::from_string("31.53.21.64", ec))); diff --git a/test/test_transfer.cpp b/test/test_transfer.cpp index c4a0795c6..7cc387316 100644 --- a/test/test_transfer.cpp +++ b/test/test_transfer.cpp @@ -84,7 +84,6 @@ void test_rate() << "\033[0m" << int(st2.progress * 100) << "% " << std::endl; - if (st1.paused) break; if (tor2.is_seed()) break; test_sleep(1000); } @@ -96,7 +95,7 @@ void test_rate() std::cerr << "downloaded " << t->total_size() << " bytes " "in " << (total_milliseconds(dt) / 1000.f) << " seconds" << std::endl; - std::cerr << "average download rate: " << (t->total_size() / total_milliseconds(dt)) + std::cerr << "average download rate: " << (t->total_size() / (std::max)(total_milliseconds(dt), 1)) << " kB/s" << std::endl; } diff --git a/test/test_web_seed.cpp b/test/test_web_seed.cpp index 4963cf38e..685036aa2 100644 --- a/test/test_web_seed.cpp +++ b/test/test_web_seed.cpp @@ -55,7 +55,7 @@ void test_transfer(boost::intrusive_ptr torrent_file, int proxy) session ses(fingerprint(" ", 0,0,0,0), 0); session_settings settings; settings.ignore_limits_on_local_network = false; - settings.max_outstanding_disk_bytes_per_connection = 64 * 1024; + settings.max_outstanding_disk_bytes_per_connection = 256 * 1024; ses.set_settings(settings); ses.set_alert_mask(~alert::progress_notification); ses.listen_on(std::make_pair(51000, 52000));