Skip to content

Commit

Permalink
Make it some more random
Browse files Browse the repository at this point in the history
  • Loading branch information
miekg committed Aug 23, 2013
1 parent 6d63df6 commit a5eb409
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion unbound_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ func TestUnicodeResolve(t *testing.T) {
}

func testStress(t *testing.T) {
domains := []string{"www.google.com.", "www.isc.org.", "www.outlook.com.", "nu.nl."}

max := 8
procs := runtime.GOMAXPROCS(max)
wg := new(sync.WaitGroup)
Expand All @@ -109,7 +111,7 @@ func testStress(t *testing.T) {
for i := 0; i < max; i++ {
go func() {
for i := 0; i < 1000; i++ {
r, err := u.Resolve("www.google.com.", dns.TypeA, dns.ClassINET)
r, err := u.Resolve(domains[dns.Id() % 4], dns.TypeA, dns.ClassINET)
if err != nil {
t.Log("failure to resolve google")
continue
Expand Down

0 comments on commit a5eb409

Please sign in to comment.