mirror of
https://github.com/golang/go
synced 2024-11-12 07:10:22 -07:00
net: disable TestDNSThreadLimit even in non-short mode by default
TestDNSThreadLimit creates tons of DNS queries and it occasionally causes an unintentional traffic jam and/or crash of some virtual machine software, especially its builtin networking stuff. We can run TestDNSThreadLimit with -dnsflood flag instead. LGTM=dave, rsc R=rsc, dave CC=golang-codereviews https://golang.org/cl/63600043
This commit is contained in:
parent
801e40a0a4
commit
2277e8d3c9
@ -5,13 +5,16 @@
|
||||
package net
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
var testDNSFlood = flag.Bool("dnsflood", false, "whether to test dns query flooding")
|
||||
|
||||
func TestDNSThreadLimit(t *testing.T) {
|
||||
if testing.Short() || !*testExternal {
|
||||
t.Skip("skipping test to avoid external network")
|
||||
if !*testDNSFlood {
|
||||
t.Skip("test disabled; use -dnsflood to enable")
|
||||
}
|
||||
|
||||
const N = 10000
|
||||
|
Loading…
Reference in New Issue
Block a user