From 68db0038e568c603e1c88212c52f5c8185656a5f Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 30 Jul 2013 04:30:19 +0000 Subject: [PATCH] test_ssl and test_transfer polish --- test/test_ssl.cpp | 5 +++-- test/test_transfer.cpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) 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;