From: Matt Joiner Date: Wed, 6 Aug 2025 10:22:01 +0000 (+1000) Subject: Fix Torrent.close race in test X-Git-Tag: v1.59.0~2^2~43 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=1f4d88d27048371435c5e69a9933293c5ee12a43;p=btrtrc.git Fix Torrent.close race in test --- diff --git a/torrent_test.go b/torrent_test.go index 9854f800..eacf5c44 100644 --- a/torrent_test.go +++ b/torrent_test.go @@ -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() }