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

234 Commits

Author SHA1 Message Date
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
02adc3f2ee Break peer out from PeerConn 2020-05-30 10:14:20 +10:00
Matt Joiner
5b0c46cd54 Fix false positive Goland code lint 2020-04-16 14:52:52 +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
c83738f3f4 Update to latest anacrolix/dht 2020-03-17 13:47:53 +11:00
Matt Joiner
c855c7a366 Differentiate between storage.ClientImpl{,Closer} 2020-02-21 14:12:44 +11:00
Matt Joiner
7d25cfdd1d Move envpprof imports around 2020-02-21 12:58:47 +11:00
Matt Joiner
dff436f102 Rename connection->PeerConn and fix exports 2020-02-21 11:07:50 +11:00
Matt Joiner
afe4d8795d Support custom DHT servers
Addresses #266.
2020-02-20 17:46:29 +11:00
Matt Joiner
3505d126d4 TestClientDisabledImplicitNetworksButDhtEnabled 2020-02-20 16:57:28 +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
Matt Joiner
e9e128cbf8 Split Client dialers and listeners 2020-02-20 11:10:05 +11:00
Matt Joiner
376ff763fe Apply staticcheck 2020-02-20 11:09:57 +11:00
Matt Joiner
72e54fb353 Resource per piece storage: Store incomplete chunks separately 2020-01-14 10:51:09 +11:00
Matt Joiner
4911b29903 Use subtests in TestClientTransferVarious 2020-01-14 10:51:09 +11:00
Matt Joiner
5f1d937b62 Add connection trust flag, and more tests with small caches
Thanks to observations and feedback from @ccampbell.
2019-12-18 13:52:00 +11:00
Matt Joiner
f448f55e88 Coalesce piece state change notifications on client unlock
Reported by Craig Campbell <iamcraigcampbell@gmail.com>.
2019-12-13 15:55:56 +11:00
Matt Joiner
63993a3dc2 Add a test for issue #335 2019-10-11 17:34:07 +11:00
Matt Joiner
ff9d845006 Add code for dumping log Msg values to TestingConfig 2019-10-03 19:12:33 +10:00
Matt Joiner
ee5e459ea3 Tidy up piece completion change handling 2019-08-21 21:06:39 +10:00
Matt Joiner
cb1bf0f413 goimports -local 2019-08-21 20:58:40 +10:00
Matt Joiner
9224303c1e Update all imports of dht to v2 2019-08-10 18:46:07 +10:00
Matt Joiner
958ff01eab Change the default client port 2019-07-19 16:19:21 +10:00
Matt Joiner
f0e7f5e7a0 Add an error check in a test
Managed to get this to fail, and it just panicked.
2019-07-19 16:17:10 +10:00
Matt Joiner
1d8873552a Rework header obfuscation and add tests for fallbacks 2019-07-19 13:23:36 +10:00
Matt Joiner
09b587f17b Comments 2019-07-19 13:04:10 +10:00
Matt Joiner
cde8062e75 Report allocs in BenchmarkAddLargeTorrent 2019-01-30 15:19:32 +11:00
Matt Joiner
ddbba214da Fix test for dht query context changes 2019-01-21 22:36:40 +01:00
Matt Joiner
6bb761ab6d Simplify single case select 2018-11-28 10:32:44 +11:00
Matt Joiner
4f5387cbbd Fix benchmark broken by changes to client listeners 2018-11-04 17:51:32 +11:00
Matt Joiner
1a4950ad4a Add default DHT servers when UTP disabled
Also ensures that UDP and TCP sockets are reserved, even if not used, and fixes tests. Fixes #289.
2018-11-04 17:43:47 +11:00
Matt Joiner
8a0f333bb9 Add test for dht servers when utp disabled
#289
2018-11-04 17:42:12 +11:00
Matt Joiner
fc4fab91f5 Switch to goimports import sorting
Used to use sortimports, but it's old, and goimports seems to have an opinion now.
2018-11-02 23:12:01 +11:00
Matt Joiner
2940f27f9f Use the new firewall callback support in go-libutp 2018-07-25 17:11:09 +10:00
Matt Joiner
6dd3b9c12c Law of Demeter Client.mu 2018-07-25 13:42:28 +10:00
Matt Joiner
50def7a688 Move PEX stuff into peer_protocol 2018-07-10 11:21:24 +10:00
Matt Joiner
57849844ae Rework status export in tests to allow count > 1 without a server for every test 2018-06-26 19:54:48 +10:00
Matt Joiner
0f5a2f0c05 Disable accept rate limiting by default in tests 2018-06-17 21:20:41 +10:00
Matt Joiner
68e88977d5 Remove TestUTPRawConn
It's a bit racy and depends on flaky network. Something like this belongs in the utp package anyway.
2018-06-16 20:17:05 +10:00
Matt Joiner
e97f487d2e Rename Config->ClientConfig and change how defaults work
This is a very breaking change.
2018-06-16 16:30:04 +10:00
Matt Joiner
c9187bf736 Update some tests now that adding connections is more reliable 2018-06-13 22:02:30 +10:00
Matt Joiner
360e1dbdd1 Track ConnStats with atomics 2018-06-12 20:21:53 +10:00
Matt Joiner
2007f2c234 Make download cancellable tests more reliable 2018-06-12 20:19:53 +10:00
Matt Joiner
a9bdb438dc Fix timing failures in download cancel tests 2018-06-10 09:20:33 +10:00
Matt Joiner
e04b6f0ba0 Try to make test more reliable 2018-04-14 11:23:26 +10:00
Matt Joiner
e9386d1016 Fix #246 2018-04-12 23:34:31 +10:00
Matt Joiner
485d8cdf61 Use new DHT stats fields 2018-04-12 16:11:22 +10:00
Matt Joiner
83e4c65fc4 Add LoopbackListenHost 2018-04-12 15:21:31 +10:00