forked from premiere/premiere-libtorrent
test fixes
This commit is contained in:
parent
dce0e1bb58
commit
242967a64d
|
@ -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)));
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ void test_transfer(boost::intrusive_ptr<torrent_info> 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));
|
||||
|
|
Loading…
Reference in New Issue