You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TestSources can fail under full-suite load with no results #452
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)
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.
Activity
TMHSDigital commentedon Nov 29, 2026
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.