Some slow tracker tests can be Parallel
This commit is contained in:
parent
b0b5794890
commit
12722754e6
@ -5,6 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestUnsupportedTrackerScheme(t *testing.T) {
|
func TestUnsupportedTrackerScheme(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
_, err := New("lol://tracker.openbittorrent.com:80/announce")
|
_, err := New("lol://tracker.openbittorrent.com:80/announce")
|
||||||
if err != ErrBadScheme {
|
if err != ErrBadScheme {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
@ -46,6 +46,7 @@ func TestMarshalAnnounceResponse(t *testing.T) {
|
|||||||
|
|
||||||
// Failure to write an entire packet to UDP is expected to given an error.
|
// Failure to write an entire packet to UDP is expected to given an error.
|
||||||
func TestLongWriteUDP(t *testing.T) {
|
func TestLongWriteUDP(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
l, err := net.ListenUDP("udp", nil)
|
l, err := net.ListenUDP("udp", nil)
|
||||||
defer l.Close()
|
defer l.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -84,6 +85,7 @@ func TestConvertInt16ToInt(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestAnnounceLocalhost(t *testing.T) {
|
func TestAnnounceLocalhost(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
srv := server{
|
srv := server{
|
||||||
t: map[[20]byte]torrent{
|
t: map[[20]byte]torrent{
|
||||||
[20]byte{0xa3, 0x56, 0x41, 0x43, 0x74, 0x23, 0xe6, 0x26, 0xd9, 0x38, 0x25, 0x4a, 0x6b, 0x80, 0x49, 0x10, 0xa6, 0x67, 0xa, 0xc1}: {
|
[20]byte{0xa3, 0x56, 0x41, 0x43, 0x74, 0x23, 0xe6, 0x26, 0xd9, 0x38, 0x25, 0x4a, 0x6b, 0x80, 0x49, 0x10, 0xa6, 0x67, 0xa, 0xc1}: {
|
||||||
@ -123,6 +125,7 @@ func TestAnnounceLocalhost(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestUDPTracker(t *testing.T) {
|
func TestUDPTracker(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
tr, err := New("udp://tracker.openbittorrent.com:80/announce")
|
tr, err := New("udp://tracker.openbittorrent.com:80/announce")
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
@ -154,6 +157,7 @@ func TestUDPTracker(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestAnnounceRandomInfoHashThirdParty(t *testing.T) {
|
func TestAnnounceRandomInfoHashThirdParty(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
// This test involves contacting third party servers that may have
|
// This test involves contacting third party servers that may have
|
||||||
// unpreditable results.
|
// unpreditable results.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user