From e4bc4fc1150f8052b460f1481ef3a3cf2bdd3888 Mon Sep 17 00:00:00 2001 From: arvidn Date: Fri, 19 Jun 2015 01:41:33 -0400 Subject: [PATCH] improve reliability of test_tracker --- test/test_tracker.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_tracker.cpp b/test/test_tracker.cpp index 4f31a8a05..0d84e792a 100644 --- a/test/test_tracker.cpp +++ b/test/test_tracker.cpp @@ -308,6 +308,10 @@ TORRENT_TEST(udp_tracker) // we should have announced to the tracker by now TEST_EQUAL(num_udp_announces(), prev_udp_announces + 1); + // if we remove the torrent before it has received the response from the + // tracker, it won't announce again to stop. So, wait a bit before removing. + test_sleep(1000); + s->remove_torrent(h); for (int i = 0; i < 50; ++i)