Skip to content

TestSources can fail under full-suite load with no results #452

Done

Description

@TMHSDigital

Summary

TestSources in pkg/subenum/sources_test.go failed once in a full local go test -count=1 ./... run (Windows, 2026-11-29) and passed on every rerun (5 alone, and the whole package).

--- FAIL: TestSources (1.00s)
    sources_test.go:79: results and their sources = map[], want map["cmdb.example.test":["inventory"] "legacy.example.test":["Sources[0]" "inventory"] "www.example.test":["wordlist" "Sources[0]"]]
    sources_test.go:85: www was looked up 0 times; a source repeating a word must not add it twice

Likely cause

No results and no lookup of www at all, after exactly 1.00 s, points at an early step (the resolver preflight or the wildcard check) timing out under full-suite load, so the scan stops before any candidate is queried. The test's subenum.Config leaves Timeout and Attempts at the library defaults. Same class as #412 and #439.

Suggested fix

Give the test a generous Timeout (and Attempts) like the other local-server tests, or check the event stream for an error/abort event and report it, so a timeout fails with its real reason instead of an empty map. Look for other pkg/subenum tests against dnstest.Start that rely on the default timeout.

Done when

  • TestSources sets an explicit timeout (or surfaces the abort reason)
  • go test -count=3 ./... passes under load

Activity

  1. added
    good first issue
    testing
    on Nov 29, 2026
  2. TMHSDigital commented on Nov 29, 2026

    @TMHSDigital
    OwnerAuthor

    Fixed in 5fe6e26: TestSources, TestSourcesRunAtOnce, TestTruncatedSourceIsScanned and the three zone-transfer/NSEC-walk scans in zone_test.go now set Timeout 10s and Attempts 2 instead of the 1 s library default, and TestSources reports any KindError event, so a timeout fails with its real reason instead of an empty map. Verified with go test -count=3 ./... (whole repo, passes) plus golangci-lint v2.15.0.

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 issuetesting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions