watcher tests: fewer queries per domain check, longer live attempts (closes #214)
check / check (push) Successful in 1m32s

ResolveIPAddresses, which a domain check runs for each nameserver, asked
every nameserver of the name's zone for all eight record types and read
only A, AAAA and CNAME. It now asks for those three, so a domain check
of example.com sends about a third fewer queries.

The per-attempt deadline in livednstest goes from 8 to 18 seconds. It
was sized for one lookup, while a watcher check sends over a hundred
queries in a row and on the CI runner ran past 8 seconds. Three attempts
still end under the 60-second cap.

A nameserver that answers none of the three queries now counts as not
answering even if it would have answered another type; the watcher keeps
the previous addresses either way.

Model: opus-5-5
This commit is contained in:
2026-10-02 02:07:00 +00:00
parent 82836b41fd
commit 30f8f05fd5
4 changed files with 55 additions and 21 deletions
+8 -5
View File
@@ -36,11 +36,14 @@ const (
// before the test fails.
attempts = 3
// AttemptTimeout bounds one attempt. Worst case for an operation
// is attempts * AttemptTimeout plus the backoff — about 26
// seconds, well inside the 90-second `go test -timeout` backstop
// even when several operations exhaust their attempts.
AttemptTimeout = 8 * time.Second
// AttemptTimeout bounds one attempt. It must fit the longest
// operation, a watcher check, which sends over a hundred queries one
// after another and on a slow build host takes several times as long
// as the few seconds it takes on a fast one. Worst case for an
// operation is attempts * AttemptTimeout plus the backoff — about 56
// seconds, under the suite's 60-second cap and inside the 90-second
// `go test -timeout` backstop.
AttemptTimeout = 18 * time.Second
// backoffBase is the delay after the first failed attempt; it is
// multiplied by backoffFactor each time.