1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
13 var testDNSFlood
= flag
.Bool("dnsflood", false, "whether to test dns query flooding")
15 func TestDNSThreadLimit(t
*testing
.T
) {
17 t
.Skip("test disabled; use -dnsflood to enable")
21 c
:= make(chan int, N
)
22 for i
:= 0; i
< N
; i
++ {
24 LookupIP(fmt
.Sprintf("%d.net-test.golang.org", i
))
28 // Don't bother waiting for the stragglers; stop at 0.9 N.
29 for i
:= 0; i
< N
*9/10; i
++ {
31 //println("TestDNSThreadLimit:", i)
36 // If we're still here, it worked.