From: Matt Joiner Date: Sat, 27 May 2023 02:40:15 +0000 (+1000) Subject: Add check that torrent data cleanup works in TestIssue335 X-Git-Tag: v1.52.0~15 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=5ba8506b3f1165c0e3458668bff02cc936c65054;p=btrtrc.git Add check that torrent data cleanup works in TestIssue335 I'm seeing a lot of leaked directories on Windows I think. This might be silently failing. --- diff --git a/client-nowasm_test.go b/client-nowasm_test.go index 5c7f6251..41645b6e 100644 --- a/client-nowasm_test.go +++ b/client-nowasm_test.go @@ -32,7 +32,12 @@ func TestBoltPieceCompletionClosedWhenClientClosed(t *testing.T) { func TestIssue335(t *testing.T) { dir, mi := testutil.GreetingTestTorrent() - defer os.RemoveAll(dir) + defer func() { + err := os.RemoveAll(dir) + if err != nil { + t.Fatalf("removing torrent dummy data dir: %v", err) + } + }() cfg := TestingConfig(t) cfg.Seed = false cfg.Debug = true