ctx := context.Background()
_, _, err := r.exchange(ctx, "0.0.0.0", mustQuestion("com.", dnsmessage.TypeALL, dnsmessage.ClassINET), time.Second, useUDPOrTCP, false)
if err != nil {
- t.Fatal("exhange failed:", err)
+ t.Fatal("exchange failed:", err)
}
}
}))
// Try to trigger a timeout after reading part of the response body.
- // The initial timeout is emprically usually long enough on a decently fast
+ // The initial timeout is empirically usually long enough on a decently fast
// machine, but if we undershoot we'll retry with exponentially longer
// timeouts until the test either passes or times out completely.
// This keeps the test reasonably fast in the typical case but allows it to
// would be sent to every subdomain of bbc.co.uk.
// It just doesn't make sense on IP addresses.
// The other processing and validation steps in RFC 6265 just
- // collaps to:
+ // collapse to:
if host != domain {
return "", false, errIllegalDomain
}
// an underlying TCP connection after making an http.Request with Request.Close set.
//
// It tests the behavior by making an HTTP request to a server which
-// describes the source source connection it got (remote port number +
+// describes the source connection it got (remote port number +
// address of its net.Conn).
func TestTransportConnectionCloseOnRequest(t *testing.T) {
run(t, testTransportConnectionCloseOnRequest, []testMode{http1Mode})
if !tt.wantTimeout {
if !retry {
// The timeout may be set too short. Retry with a longer one.
- t.Logf("unexpected timout for path %q after %v; retrying with longer timeout", tt.path, timeout)
+ t.Logf("unexpected timeout for path %q after %v; retrying with longer timeout", tt.path, timeout)
timeout *= 2
retry = true
}
_, err := cst.c.Get(cst.ts.URL)
if err == nil {
close(cancelHandler)
- t.Fatal("unexpected Get succeess")
+ t.Fatal("unexpected Get success")
}
tooSlow := time.NewTimer(timeout * 10)
case <-tooSlow.C:
// If we didn't get into the Handler, that probably means the builder was
// just slow and the Get failed in that time but never made it to the
- // server. That's fine; we'll try again with a longer timout.
- t.Logf("no handler seen in %v; retrying with longer timout", timeout)
+ // server. That's fine; we'll try again with a longer timeout.
+ t.Logf("no handler seen in %v; retrying with longer timeout", timeout)
close(cancelHandler)
cst.close()
timeout *= 2
return mptcpAvailable
}
-// Check that MPTCP is supported by attemting to create an MPTCP socket and by
+// Check that MPTCP is supported by attempting to create an MPTCP socket and by
// looking at the returned error if any.
func initMPTCPavailable() {
s, err := sysSocket(syscall.AF_INET, syscall.SOCK_STREAM, _IPPROTO_MPTCP)
minDynamicTimeout = 1 * time.Millisecond
// maxDynamicTimeout is the maximum timeout to attempt for
- // tests that automatically increase timeouts until succeess.
+ // tests that automatically increase timeouts until success.
//
// This should be a strict upper bound on the latency required to hit a
// timeout accurately, even on a slow or heavily-loaded machine. If a test