From 5ba8506b3f1165c0e3458668bff02cc936c65054 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sat, 27 May 2023 12:40:15 +1000 Subject: [PATCH] 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. --- client-nowasm_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.44.0