forked from premiere/premiere-libtorrent
valgrind unit test polish
This commit is contained in:
parent
5388f0af74
commit
65475d54a6
|
@ -146,7 +146,14 @@ void test_proxy(proxy_settings::proxy_type proxy_type, int flags)
|
|||
h.connect_peer(tcp::endpoint(address_v4::from_string("127.0.0.1"), peer_port));
|
||||
|
||||
rejected_trackers.clear();
|
||||
for (int i = 0; i < 15; ++i)
|
||||
|
||||
#ifdef TORRENT_USE_VALGRIND
|
||||
const int timeout = 90;
|
||||
#else
|
||||
const int timeout = 15;
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < timeout; ++i)
|
||||
{
|
||||
print_alerts(*s, "s", false, false, false, &alert_predicate);
|
||||
test_sleep(100);
|
||||
|
|
|
@ -185,6 +185,11 @@ void test_ssl(int test_idx, bool use_utp)
|
|||
, "test");
|
||||
}
|
||||
|
||||
#ifdef TORRENT_USE_VALGRIND
|
||||
const int timeout = 100;
|
||||
#else
|
||||
const int timeout = 40;
|
||||
#endif
|
||||
for (int i = 0; i < 40; ++i)
|
||||
{
|
||||
print_alerts(ses1, "ses1", true, true, true, &on_alert);
|
||||
|
@ -209,7 +214,11 @@ void test_ssl(int test_idx, bool use_utp)
|
|||
<< std::endl;
|
||||
}
|
||||
|
||||
if (peer_disconnects >= 2) break;
|
||||
if (peer_disconnects >= 2)
|
||||
{
|
||||
fprintf(stderr, "too many disconnects (%d), breaking\n", peer_disconnects);
|
||||
break;
|
||||
}
|
||||
|
||||
if (st2.is_finished) break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue