diff --git a/test/test_fast_extension.cpp b/test/test_fast_extension.cpp index e07569d33..35a8dc5cb 100644 --- a/test/test_fast_extension.cpp +++ b/test/test_fast_extension.cpp @@ -452,8 +452,7 @@ boost::shared_ptr 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(); diff --git a/test/test_storage.cpp b/test/test_storage.cpp index 0c51007ac..889fdb90e 100644 --- a/test/test_storage.cpp +++ b/test/test_storage.cpp @@ -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();