improve test robustness
This commit is contained in:
parent
07f78264e3
commit
f5bb8c4b77
|
@ -452,8 +452,7 @@ boost::shared_ptr<torrent_info> setup_peer(tcp::socket& s, sha1_hash& ih
|
|||
{
|
||||
tcp::acceptor l(s.get_io_service());
|
||||
l.open(tcp::v4());
|
||||
l.bind(tcp::endpoint(address_v4::from_string("127.0.0.1")
|
||||
, 3000 + rand() % 60000));
|
||||
l.bind(tcp::endpoint(address_v4::from_string("127.0.0.1"), 0));
|
||||
l.listen();
|
||||
tcp::endpoint addr = l.local_endpoint();
|
||||
|
||||
|
|
|
@ -769,7 +769,7 @@ void test_rename_file_fastresume(bool test_deprecated)
|
|||
h.rename_file(0, "testing_renamed_files");
|
||||
std::cout << "renaming file" << std::endl;
|
||||
bool renamed = false;
|
||||
for (int i = 0; i < 10; ++i)
|
||||
for (int i = 0; i < 30; ++i)
|
||||
{
|
||||
if (print_alerts(ses, "ses", true, true, true, &got_file_rename_alert)) renamed = true;
|
||||
torrent_status s = h.status();
|
||||
|
|
Loading…
Reference in New Issue