]> Sergey Matveev's repositories - btrtrc.git/commitdiff
tracker/udp: Triage errors in tests to real hosts
authorMatt Joiner <anacrolix@gmail.com>
Thu, 20 Nov 2014 22:24:49 +0000 (16:24 -0600)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 20 Nov 2014 22:24:49 +0000 (16:24 -0600)
tracker/udp/udp_tracker_test.go

index 95df6bc46af6f018280794c005b9118207249b59..deb4f7cc60742b636c2343a36cf09fcbd9aa21aa 100644 (file)
@@ -105,6 +105,7 @@ func TestUDPTracker(t *testing.T) {
        }
 }
 
+// TODO: Create a fake UDP tracker to make these requests to.
 func TestAnnounceRandomInfoHash(t *testing.T) {
        wg := sync.WaitGroup{}
        for _, url := range []string{
@@ -131,7 +132,8 @@ func TestAnnounceRandomInfoHash(t *testing.T) {
                        rand.Read(req.InfoHash[:])
                        resp, err := tr.Announce(&req)
                        if err != nil {
-                               t.Fatal(err)
+                               t.Logf("error announcing to %s: %s", url, err)
+                               return
                        }
                        if resp.Leechers != 0 || resp.Seeders != 0 || len(resp.Peers) != 0 {
                                t.Fatal(resp)