From 626133defaac79f6e8dff3a5103b95ce69b11c81 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 4 Aug 2013 00:02:32 +0000 Subject: [PATCH] be more forgiving of slow (or busy) hardware in test_transfer --- test/test_transfer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test_transfer.cpp b/test/test_transfer.cpp index 0ede91b25..47be1f1b0 100644 --- a/test/test_transfer.cpp +++ b/test/test_transfer.cpp @@ -365,7 +365,7 @@ void test_transfer(int proxy_type, bool test_disk_full = false, bool test_allowe tracker_responses = 0; - for (int i = 0; i < 50; ++i) + for (int i = 0; i < 200; ++i) { print_alerts(ses1, "ses1", true, true, true, &on_alert); print_alerts(ses2, "ses2", true, true, true, &on_alert); @@ -415,6 +415,9 @@ void test_transfer(int proxy_type, bool test_disk_full = false, bool test_allowe if (!test_disk_full && peer_disconnects >= 2) break; + // if nothing is being transferred after 2 seconds, we're failing the test + if (st1.upload_payload_rate == 0 && i > 20) break; + test_sleep(100); }