From ddbba214daa8dff71345f186e5a526d7c6e585ca Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Mon, 21 Jan 2019 22:36:40 +0100 Subject: [PATCH] Fix test for dht query context changes --- client_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client_test.go b/client_test.go index 363542c1..5f7055df 100644 --- a/client_test.go +++ b/client_test.go @@ -736,7 +736,9 @@ func TestAddMetainfoWithNodes(t *testing.T) { // check if the announce-list is here instead. TODO: Add nodes. assert.Len(t, tt.metainfo.AnnounceList, 5) // There are 6 nodes in the torrent file. - assert.EqualValues(t, 6*len(cl.dhtServers), sum()) + for sum() != int64(6*len(cl.dhtServers)) { + time.Sleep(time.Millisecond) + } } type testDownloadCancelParams struct { -- 2.48.1