]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Fix test for dht query context changes
authorMatt Joiner <anacrolix@gmail.com>
Mon, 21 Jan 2019 21:36:40 +0000 (22:36 +0100)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 21 Jan 2019 21:36:40 +0000 (22:36 +0100)
client_test.go

index 363542c1a3a55e1df0700d19eb3a21f135419a47..5f7055df1f711400241acbd8e56e3e81fd472035 100644 (file)
@@ -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 {