From: Matt Joiner Date: Thu, 12 May 2016 02:44:51 +0000 (+1000) Subject: Probably fix test failure X-Git-Tag: v1.0.0~730 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=506ad00fd5525e74fe40f67601e928a92969aa8b;p=btrtrc.git 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. --- 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)