Skip to content

TestPoolOfLiarsFallsBackToTrusted fails under full-suite load #412

Closed

Description

@TMHSDigital

Summary

TestPoolOfLiarsFallsBackToTrusted gives both resolvers a 1 s timeout and a single attempt, then asserts exact counts. Under full-suite load, one late loopback answer is enough to fail it.

Where

  • internal/scan/retry_edges_test.go:154-168
  • internal/scan/runner.go:723-743 (resolveViaPool returns the trusted lookup's failure outcome as is)

Details

// Timeout: time.Second, Attempts: 1 on both the lying member and the trusted resolver
if st.Found != 1 || st.NXDomain != int64(len(entries)-1) {

A local full-suite run (go test -count=1 -coverpkg=./... ./...) failed with found 1 nxdomain 19; want only www… after 1.06 s. A passing run takes about 50 ms, so one name used up the whole per-query budget. The failure message prints only Found and NXDomain, so it does not say which outcome the missing name got.

Impact

Occasional red builds on a loaded runner. CI's Linux leg runs this package with -race and -coverpkg, which is slower still. This is the same class as the closed timeout flakes #289 and #235.

Steps to reproduce

Seen once in two local full-suite runs (Windows, go1.26.11). Not reproduced in isolation: go test -count=40 -run 'TestPoolOfLiarsFallsBackToTrusted$' ./internal/scan/ passed every time.

Suggested fix

Give both resolvers headroom: Attempts: 2, or a 3 s timeout on dns.NewResolver, dns.NewPool and Config.Timeout. Add st.Timeout, st.Other and st.Unconfirmed to the failure message.

Acceptance criteria

  • The test tolerates one slow loopback answer
  • The failure message names the outcome of the missing names

Getting started


Filed by repo-audit/full-audit at dd5b156. Severity: low. Effort: S. audit-key: testing|internal/scan/retry_edges_test.go|TestPoolOfLiarsFallsBackToTrusted

Activity

  1. added
    good first issue
    testing
    severity: low
    on Nov 17, 2026
  2. TMHSDigital commented on Nov 18, 2026

    @TMHSDigital
    OwnerAuthor

    Fixed in fc64cbf. The test now uses a 3s timeout on the trusted resolver, the pool and Config.Timeout, and two attempts, and its failure message also prints the timeout, other and unconfirmed counts.

    Verified: go test -count=30 and go test -race -count=3 of the test pass locally, as does the full scan package; CI green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueseverity: lowtesting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions