]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Invalid test
authorMatt Joiner <anacrolix@gmail.com>
Tue, 4 Aug 2015 16:38:36 +0000 (02:38 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Tue, 4 Aug 2015 16:38:36 +0000 (02:38 +1000)
The function is never exposed publicly or called without holding the client lock.

torrent_test.go

index 6134e28df26fd177e6ffb98767fb9ad400edd11f..bca6f775f10bba480af15bea6d5c2d1b068d910b 100644 (file)
@@ -1,7 +1,6 @@
 package torrent
 
 import (
-       "sync"
        "testing"
 
        "github.com/anacrolix/torrent/peer_protocol"
@@ -43,22 +42,6 @@ func TestTorrentRequest(t *testing.T) {
        }
 }
 
-func TestTorrentDoubleClose(t *testing.T) {
-       tt, err := newTorrent(InfoHash{})
-       if err != nil {
-               t.Fatal(err)
-       }
-       wg := sync.WaitGroup{}
-       for i := 0; i < 2; i++ {
-               wg.Add(1)
-               go func() {
-                       tt.close()
-                       wg.Done()
-               }()
-       }
-       wg.Wait()
-}
-
 func TestAppendToCopySlice(t *testing.T) {
        orig := []int{1, 2, 3}
        dupe := append([]int{}, orig...)