Run new test in parallel
This commit is contained in:
parent
e95c510948
commit
6706ff9f0b
|
@ -2984,6 +2984,7 @@ func TestDNS_ServiceLookup_Randomize(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestBinarySearch(t *testing.T) {
|
||||
t.Parallel()
|
||||
msgSrc := new(dns.Msg)
|
||||
msgSrc.Compress = true
|
||||
msgSrc.SetQuestion("redis.service.consul.", dns.TypeSRV)
|
||||
|
@ -2994,6 +2995,7 @@ func TestBinarySearch(t *testing.T) {
|
|||
msgSrc.Extra = append(msgSrc.Extra, &dns.CNAME{Hdr: dns.RR_Header{Name: target, Class: 1, Rrtype: dns.TypeCNAME, Ttl: 0x3c}, Target: fmt.Sprintf("fx.168.%d.%d.", i/256, i%256)})
|
||||
}
|
||||
for idx, maxSize := range []int{12, 256, 512, 8192, 65535} {
|
||||
t.Run(fmt.Sprintf("binarySearch %d", maxSize), func(t *testing.T) {
|
||||
msg := new(dns.Msg)
|
||||
msgSrc.Compress = true
|
||||
msgSrc.SetQuestion("redis.service.consul.", dns.TypeSRV)
|
||||
|
@ -3015,6 +3017,7 @@ func TestBinarySearch(t *testing.T) {
|
|||
if len(buf) > maxSize || (idx != 0 && len(buf) < 16) || (maxSize == 65535 && blen != 50) {
|
||||
t.Fatalf("bad[%d]: %d > %d", idx, len(buf), maxSize)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue