Commit 77faa652 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder Committed by Brad Fitzpatrick

net: use retry in TestLookupGmailNS

There are two flakes present on the dashboard for this test.

Change-Id: I4abec972586314fbafe7db5760b91afd7ae47fd3
Reviewed-on: https://go-review.googlesource.com/106980
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent d2c7dec1
......@@ -154,6 +154,7 @@ var lookupGmailNSTests = []struct {
}
func TestLookupGmailNS(t *testing.T) {
t.Parallel()
if testenv.Builder() == "" {
testenv.MustHaveExternalNetwork(t)
}
......@@ -162,12 +163,20 @@ func TestLookupGmailNS(t *testing.T) {
t.Skip("IPv4 is required")
}
defer dnsWaitGroup.Wait()
for _, tt := range lookupGmailNSTests {
attempts := 0
for i := 0; i < len(lookupGmailNSTests); i++ {
tt := lookupGmailNSTests[i]
nss, err := LookupNS(tt.name)
if err != nil {
testenv.SkipFlakyNet(t)
if attempts < len(backoffDuration) {
dur := backoffDuration[attempts]
t.Logf("backoff %v after failure %v\n", dur, err)
time.Sleep(dur)
attempts++
i--
continue
}
t.Fatal(err)
}
if len(nss) == 0 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment