]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Fix Torrent.close race in test
authorMatt Joiner <anacrolix@gmail.com>
Wed, 6 Aug 2025 10:22:01 +0000 (20:22 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Wed, 6 Aug 2025 10:22:01 +0000 (20:22 +1000)
torrent_test.go

index 9854f800f4cfcaa99281c508cabbc860e5eee753..eacf5c44d702063af58fd66ca89fefcbab2fea59 100644 (file)
@@ -7,7 +7,6 @@ import (
        "net"
        "os"
        "path/filepath"
-       "sync"
        "testing"
 
        g "github.com/anacrolix/generics"
@@ -247,7 +246,6 @@ func TestRelativeAvailabilityHaveNone(t *testing.T) {
        err = pc.peerSentHaveNone()
        tt.cl.unlock()
        qt.Assert(t, qt.IsNil(err))
-       var wg sync.WaitGroup
-       tt.close(&wg)
+       tt.Drop()
        tt.assertAllPiecesRelativeAvailabilityZero()
 }