diff --git a/test/test_ssl.cpp b/test/test_ssl.cpp index 65d751dee..a7e2f13a0 100644 --- a/test/test_ssl.cpp +++ b/test/test_ssl.cpp @@ -78,7 +78,7 @@ int peer_disconnects = 0; bool predicate(alert* a) { - if (peer_disconnected_alert* p = alert_cast(a)) + if (alert_cast(a)) ++peer_disconnects; return false; } @@ -178,7 +178,8 @@ void test_ssl(int test_idx) TEST_CHECK(st1.state == torrent_status::seeding || st1.state == torrent_status::checking_files); - TEST_CHECK(st2.state == torrent_status::downloading); + TEST_CHECK(st2.state == torrent_status::downloading + || st2.state == torrent_status::checking_files); test_sleep(100); } diff --git a/test/test_transfer.cpp b/test/test_transfer.cpp index 3bceb8a02..f61f638c0 100644 --- a/test/test_transfer.cpp +++ b/test/test_transfer.cpp @@ -57,7 +57,7 @@ int peer_disconnects = 0; bool predicate(alert* a) { - if (peer_disconnected_alert* p = alert_cast(a)) + if (alert_cast(a)) ++peer_disconnects; return false; } @@ -414,6 +414,7 @@ void test_transfer(int proxy_type, bool test_disk_full = false, bool test_allowe TEST_CHECK(st1.state == torrent_status::seeding || st1.state == torrent_status::checking_files); TEST_CHECK(st2.state == torrent_status::downloading + || st2.state == torrent_status::checking_files || (test_disk_full && !st2.error.empty())); if (peer_disconnects == 2) break;