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.
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)