bencode/bench_test.go | 1 + client-nowasm_test.go | 5 +++-- client_test.go | 10 ++++------ internal/nestedmaps/nestedmaps_test.go | 3 +-- network_test.go | 1 - peer_protocol/pex_test.go | 2 +- peerconn_test.go | 3 +-- pex_test.go | 2 +- requesting_test.go | 3 ++- reuse_test.go | 1 - storage/safe-path_test.go | 3 ++- storage/sqlite/sqlite-storage_test.go | 5 +++-- test/issue377_test.go | 3 +-- test/transfer_test.go | 10 +++++----- tracker/http/http_test.go | 5 +++-- tracker/udp-server_test.go | 1 + tracker/udp_test.go | 3 ++- utp_test.go | 1 - diff --git a/bencode/bench_test.go b/bencode/bench_test.go index d6faafb76a124989f40abd52b26ecf1b453118d4..5cf1ce894c01e3a8b515976d1d8102b200e3187e 100644 --- a/bencode/bench_test.go +++ b/bencode/bench_test.go @@ -6,6 +6,7 @@ "reflect" "testing" "github.com/anacrolix/dht/v2/krpc" + "github.com/anacrolix/torrent/bencode" ) diff --git a/client-nowasm_test.go b/client-nowasm_test.go index 62c5a1dbbf83b8210d4bd4fcac724c0cdeabe677..5c7f6251f6929517307067f584ce3ce7848bc41b 100644 --- a/client-nowasm_test.go +++ b/client-nowasm_test.go @@ -7,10 +7,11 @@ import ( "os" "testing" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/anacrolix/torrent/internal/testutil" "github.com/anacrolix/torrent/storage" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) func TestBoltPieceCompletionClosedWhenClientClosed(t *testing.T) { diff --git a/client_test.go b/client_test.go index c86243956ab5e8a9b93184c5561490c890b7a52f..e23ca1fa2d8d609e6df9249b25b47e4defbc0245 100644 --- a/client_test.go +++ b/client_test.go @@ -13,15 +13,13 @@ "testing" "testing/iotest" "time" - "github.com/frankban/quicktest" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/anacrolix/log" - "github.com/anacrolix/dht/v2" + "github.com/anacrolix/log" "github.com/anacrolix/missinggo/v2" "github.com/anacrolix/missinggo/v2/filecache" + "github.com/frankban/quicktest" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/anacrolix/torrent/bencode" "github.com/anacrolix/torrent/internal/testutil" diff --git a/internal/nestedmaps/nestedmaps_test.go b/internal/nestedmaps/nestedmaps_test.go index af808eb901f795436b8f8c70e65480a123e1eb80..97916afbbf448364ac549af4eee49e7b4cf05532 100644 --- a/internal/nestedmaps/nestedmaps_test.go +++ b/internal/nestedmaps/nestedmaps_test.go @@ -3,9 +3,8 @@ import ( "testing" + g "github.com/anacrolix/generics" qt "github.com/frankban/quicktest" - - g "github.com/anacrolix/generics" ) func TestNestedMaps(t *testing.T) { diff --git a/network_test.go b/network_test.go index f6b1bc8cf6356b9df033e91cb8122e5fe9f29d1e..5e912cc451454df73f2dbcb0f780350efc9b3d46 100644 --- a/network_test.go +++ b/network_test.go @@ -5,7 +5,6 @@ "net" "testing" "github.com/anacrolix/log" - "github.com/anacrolix/missinggo/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/peer_protocol/pex_test.go b/peer_protocol/pex_test.go index cc45059e7bd04e906093762d0583e7401de9f1be..5e5e96c14a3f0854f8c366bb63f3dd3b3cb9352a 100644 --- a/peer_protocol/pex_test.go +++ b/peer_protocol/pex_test.go @@ -6,9 +6,9 @@ "bytes" "net" "testing" + "github.com/anacrolix/dht/v2/krpc" "github.com/stretchr/testify/require" - "github.com/anacrolix/dht/v2/krpc" "github.com/anacrolix/torrent/bencode" ) diff --git a/peerconn_test.go b/peerconn_test.go index f0a5a6fd9a1489d5f375fc8264fc0baaaaaa627a..e418e07e670fe85cf02315f8b93f614f2c58f80a 100644 --- a/peerconn_test.go +++ b/peerconn_test.go @@ -9,11 +9,10 @@ "net" "sync" "testing" - "golang.org/x/time/rate" - "github.com/frankban/quicktest" qt "github.com/frankban/quicktest" "github.com/stretchr/testify/require" + "golang.org/x/time/rate" "github.com/anacrolix/torrent/metainfo" pp "github.com/anacrolix/torrent/peer_protocol" diff --git a/pex_test.go b/pex_test.go index 2b973296a68a8f510d35c5b8ce50a20e3cf812ea..7d8f6d5d0528e8c14e9e58f75b2fe8fd6e9fed43 100644 --- a/pex_test.go +++ b/pex_test.go @@ -4,10 +4,10 @@ import ( "net" "testing" + "github.com/anacrolix/dht/v2/krpc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/anacrolix/dht/v2/krpc" pp "github.com/anacrolix/torrent/peer_protocol" ) diff --git a/requesting_test.go b/requesting_test.go index 5e58df5c9733329c2f50e45b76ebfe6941d045c7..6c791a58c05994bd2375fb6fb3d2750ca5defac3 100644 --- a/requesting_test.go +++ b/requesting_test.go @@ -3,9 +3,10 @@ import ( "testing" - pp "github.com/anacrolix/torrent/peer_protocol" "github.com/bradfitz/iter" qt "github.com/frankban/quicktest" + + pp "github.com/anacrolix/torrent/peer_protocol" ) func keysAsSlice(m map[Request]struct{}) (sl []Request) { diff --git a/reuse_test.go b/reuse_test.go index 40df9a3e4778bbda4f0df70f99e996a610cb6089..ba53f288766e39cd687ce73fc2b1244557ab203c 100644 --- a/reuse_test.go +++ b/reuse_test.go @@ -9,7 +9,6 @@ "syscall" "testing" "github.com/anacrolix/log" - qt "github.com/frankban/quicktest" ) diff --git a/storage/safe-path_test.go b/storage/safe-path_test.go index 674da8fc023b42d06655b57d5fb00123ba17e74b..452ab283ff6c73701b2fac0a3cc54c4543c54e95 100644 --- a/storage/safe-path_test.go +++ b/storage/safe-path_test.go @@ -6,8 +6,9 @@ "log" "path/filepath" "testing" + qt "github.com/frankban/quicktest" + "github.com/anacrolix/torrent/metainfo" - qt "github.com/frankban/quicktest" ) func init() { diff --git a/storage/sqlite/sqlite-storage_test.go b/storage/sqlite/sqlite-storage_test.go index 390c68f47e18ec80c346ff9655819a8559bd89a4..d2f16af7ee0449911b3cb0ea855243d64244f14c 100644 --- a/storage/sqlite/sqlite-storage_test.go +++ b/storage/sqlite/sqlite-storage_test.go @@ -12,11 +12,12 @@ "time" _ "github.com/anacrolix/envpprof" "github.com/anacrolix/squirrel" + "github.com/dustin/go-humanize" + qt "github.com/frankban/quicktest" + "github.com/anacrolix/torrent/storage" test_storage "github.com/anacrolix/torrent/storage/test" "github.com/anacrolix/torrent/test" - "github.com/dustin/go-humanize" - qt "github.com/frankban/quicktest" ) func TestLeecherStorage(t *testing.T) { diff --git a/test/issue377_test.go b/test/issue377_test.go index 48e5abfbf3e15ebf000a90be98f3d3402bc507a9..5b0e659fee5709e0dfbacf9c01d07955a58f354b 100644 --- a/test/issue377_test.go +++ b/test/issue377_test.go @@ -9,14 +9,13 @@ "testing" "testing/iotest" "github.com/anacrolix/log" - pp "github.com/anacrolix/torrent/peer_protocol" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/anacrolix/torrent" "github.com/anacrolix/torrent/internal/testutil" "github.com/anacrolix/torrent/metainfo" + pp "github.com/anacrolix/torrent/peer_protocol" "github.com/anacrolix/torrent/storage" ) diff --git a/test/transfer_test.go b/test/transfer_test.go index fa159326a908f9526a1a730e45296adfe82d18ce..a008d26f4a9424599d48cd6ab493c23c10e9a4dd 100644 --- a/test/transfer_test.go +++ b/test/transfer_test.go @@ -10,14 +10,14 @@ "testing/iotest" "time" "github.com/anacrolix/missinggo/v2/filecache" - "github.com/anacrolix/torrent" - "github.com/anacrolix/torrent/internal/testutil" - "github.com/anacrolix/torrent/storage" qt "github.com/frankban/quicktest" - "golang.org/x/time/rate" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "golang.org/x/time/rate" + + "github.com/anacrolix/torrent" + "github.com/anacrolix/torrent/internal/testutil" + "github.com/anacrolix/torrent/storage" ) type fileCacheClientStorageFactoryParams struct { diff --git a/tracker/http/http_test.go b/tracker/http/http_test.go index 7fd98a5d1bda74666c2d4b44c2d5954f1da7fe6e..4e5efaf5721c1e4fad9cc379e90c1f6aaef788e4 100644 --- a/tracker/http/http_test.go +++ b/tracker/http/http_test.go @@ -4,11 +4,12 @@ import ( "net/url" "testing" - "github.com/anacrolix/torrent/bencode" - "github.com/anacrolix/torrent/tracker/udp" qt "github.com/frankban/quicktest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/anacrolix/torrent/bencode" + "github.com/anacrolix/torrent/tracker/udp" ) func TestUnmarshalHTTPResponsePeerDicts(t *testing.T) { diff --git a/tracker/udp-server_test.go b/tracker/udp-server_test.go index 7308ed0d8ef322514cfff25b1331976ffc564fa1..84408bfd1c253567908b24b2a4f85fb9ce9b6b08 100644 --- a/tracker/udp-server_test.go +++ b/tracker/udp-server_test.go @@ -10,6 +10,7 @@ "net" "github.com/anacrolix/dht/v2/krpc" "github.com/anacrolix/missinggo/v2" + "github.com/anacrolix/torrent/tracker/udp" ) diff --git a/tracker/udp_test.go b/tracker/udp_test.go index 751e41b942b2c2d45f544087f7f6d6a622fec905..cf18e0de9f2dc20fc07f7f13fd9a6b99fc48fe03 100644 --- a/tracker/udp_test.go +++ b/tracker/udp_test.go @@ -15,9 +15,10 @@ "time" "github.com/anacrolix/dht/v2/krpc" _ "github.com/anacrolix/envpprof" - "github.com/anacrolix/torrent/tracker/udp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/anacrolix/torrent/tracker/udp" ) var trackers = []string{ diff --git a/utp_test.go b/utp_test.go index 64dd4cc09c0d61feaf91dfaa31d83fd813a8dee0..18d62cabca3a995346cb92e54d4c55129555e010 100644 --- a/utp_test.go +++ b/utp_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/anacrolix/log" - "github.com/stretchr/testify/assert" )