File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import (
16
16
"regexp"
17
17
"sort"
18
18
"strings"
19
+ "syscall"
19
20
"testing"
20
21
)
21
22
@@ -171,6 +172,14 @@ func TestLookupPTR(t *testing.T) {
171
172
for _ , addr := range lookupTestIPs {
172
173
names , err := LookupAddr (addr )
173
174
if err != nil {
175
+ // The DNSError type stores the error as a string, so it cannot wrap the
176
+ // original error code and we cannot check for it here. However, we can at
177
+ // least use its error string to identify the correct localized text for
178
+ // the error to skip.
179
+ var DNS_ERROR_RCODE_SERVER_FAILURE syscall.Errno = 9002
180
+ if strings .HasSuffix (err .Error (), DNS_ERROR_RCODE_SERVER_FAILURE .Error ()) {
181
+ testenv .SkipFlaky (t , 38111 )
182
+ }
174
183
t .Errorf ("failed %s: %s" , addr , err )
175
184
}
176
185
if len (names ) == 0 {
You can’t perform that action at this time.
0 commit comments