From ce78248ba159a700d02de0d1af6330df196655d5 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Mon, 12 Feb 2018 23:49:05 +1100 Subject: [PATCH] Update test trackers --- tracker/udp_test.go | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tracker/udp_test.go b/tracker/udp_test.go index f080621f..1c064071 100644 --- a/tracker/udp_test.go +++ b/tracker/udp_test.go @@ -18,6 +18,11 @@ import ( "github.com/stretchr/testify/require" ) +var trackers = []string{ + "udp://tracker.coppersurfer.tk:6969", + "udp://tracker.leechers-paradise.org:6969", +} + // Ensure net.IPs are stored big-endian, to match the way they're read from // the wire. func TestNetIPv4Bytes(t *testing.T) { @@ -127,7 +132,7 @@ func TestUDPTracker(t *testing.T) { } rand.Read(req.PeerId[:]) copy(req.InfoHash[:], []uint8{0xa3, 0x56, 0x41, 0x43, 0x74, 0x23, 0xe6, 0x26, 0xd9, 0x38, 0x25, 0x4a, 0x6b, 0x80, 0x49, 0x10, 0xa6, 0x67, 0xa, 0xc1}) - ar, err := Announce(defaultClient, defaultHTTPUserAgent, "udp://tracker.openbittorrent.com:80/announce", &req) + ar, err := Announce(defaultClient, defaultHTTPUserAgent, trackers[0], &req) // Skip any net errors as we don't control the server. if _, ok := err.(net.Error); ok { t.Skip(err) @@ -151,15 +156,7 @@ func TestAnnounceRandomInfoHashThirdParty(t *testing.T) { wg := sync.WaitGroup{} success := make(chan bool) fail := make(chan struct{}) - for _, url := range []string{ - "udp://tracker.openbittorrent.com:80/announce", - "udp://tracker.publicbt.com:80", - "udp://tracker.istole.it:6969", - "udp://tracker.ccc.de:80", - "udp://tracker.open.demonii.com:1337", - "udp://open.demonii.com:1337", - "udp://exodus.desync.com:6969", - } { + for _, url := range trackers { wg.Add(1) go func(url string) { defer wg.Done() -- 2.50.0