2
0
mirror of synced 2025-02-24 14:48:27 +00:00

14 Commits

Author SHA1 Message Date
Matt Joiner
07bc79dbdc Test both sqlite file and in-memory leecher storages 2020-10-13 13:34:05 +11:00
Matt Joiner
d820f7861c Add a sqlite data storage implementation 2020-10-11 12:58:27 +11:00
Matt Joiner
898260c177 Tidy up some storage close handling 2020-10-11 12:40:43 +11:00
Matt Joiner
3d7a95a65d Use testing.T.Name instead of missinggo.GetTestName
This handles subtests correctly, and removes the need to specify when to export due to collisions with the old function.
2020-10-10 10:59:17 +11:00
Matt Joiner
f6c757ca65 Add tests for https://github.com/anacrolix/torrent/issues/388 2020-05-19 14:59:45 +10:00
Matt Joiner
013fa1df5a Fix transfer test check for seeder piece counts
I suspect that there's a race where a connection is established to the seeder, but we haven't received it's completed piece information yet, and we already finished reading all the data we need from another connection. Probably comes up now because pending peers with the same address aren't clobbering each other since that was fixed.
2020-04-17 11:40:25 +10:00
Matt Joiner
e5f7765dfa Fix small cache transfer tests
Since hashing Peer Addrs in the Torrent pending peers, clients are getting more than one connection to the seeder in the tests and failing.
2020-04-16 14:12:17 +10:00
Matt Joiner
c2210c058c Fix pending peer counts in transfer tests
Also expose number of peers successfully added in some method returns.
2020-04-16 14:09:45 +10:00
Matt Joiner
19ce53e69f Make io.EOF an expected error from storage.Piece.ReadAt
Fixes #381.
2020-02-27 16:45:57 +11:00
Matt Joiner
ddc61845ac Misc cleanup 2020-02-22 19:38:56 +11:00
Matt Joiner
c855c7a366 Differentiate between storage.ClientImpl{,Closer} 2020-02-21 14:12:44 +11:00
Matt Joiner
ddddc63924 Expose PeerConn.PeerPieces
Fixes #375.
2020-02-21 11:51:24 +11:00
Matt Joiner
d24922dc09 Add support for non-IP-based networks
Includes a test with unix sockets. Exposes AddDialer, AddListener, and reworks Peer.
2020-02-20 16:47:37 +11:00
Matt Joiner
0d4858ba29 Extract the transfer tests
We need them external the torrent package so we can test the API for adding dialers and listeners.
2020-02-20 13:57:24 +11:00