From: Mikio Hara Date: Fri, 14 Feb 2014 03:20:21 +0000 (+0900) Subject: net: disable TestDNSThreadLimit even in non-short mode by default X-Git-Tag: go1.3beta1~708 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2277e8d3c9c3f14aa9536f4aaeea6bfa6c316f3f;p=gostls13.git 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 --- diff --git a/src/pkg/net/z_last_test.go b/src/pkg/net/z_last_test.go index bb00f110fe..4f6a54a560 100644 --- a/src/pkg/net/z_last_test.go +++ b/src/pkg/net/z_last_test.go @@ -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