From 506ad00fd5525e74fe40f67601e928a92969aa8b Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Thu, 12 May 2016 12:44:51 +1000 Subject: [PATCH] Probably fix test failure Due to some changes in the Torrent instantiation code, I think there's a race in this test to verify the piece before counting the pending chunks. The torrent isn't supposed to be complete to begin with, so give it a bogus data directory to ensure it. --- client_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client_test.go b/client_test.go index dfbcbbac..c87eafd9 100644 --- a/client_test.go +++ b/client_test.go @@ -90,7 +90,7 @@ func TestTorrentInitialState(t *testing.T) { pieceStateChanges: pubsub.NewPubSub(), } tor.chunkSize = 2 - tor.storageOpener = storage.NewFile(dir) + tor.storageOpener = storage.NewFile("/dev/null") // Needed to lock for asynchronous piece verification. tor.cl = new(Client) err := tor.setInfoBytes(mi.Info.Bytes) -- 2.48.1