CRITICAL: make check hangs on main — resolver tests do real DNS lookups #24

Closed
opened 2026-02-21 11:37:51 +01:00 by clawbot · 0 comments
Collaborator

Problem

make check on main hangs indefinitely. The resolver tests in internal/resolver/ perform iterative DNS resolution starting from root nameservers, which can take >60s or hang entirely.

Root Cause

All resolver tests use testContext() with a 60-second timeout and perform real network DNS queries. The go test command in the Makefile has no timeout flag, so a hanging test blocks forever.

Fix

  • Add -short and -timeout 30s flags to go test in make check
  • Skip real-DNS integration tests when -short is set
  • Context-canceled tests (no network needed) still run
  • Integration tests can be run explicitly: go test -v -race ./internal/resolver/...

See PR #21.

## Problem `make check` on main hangs indefinitely. The resolver tests in `internal/resolver/` perform iterative DNS resolution starting from root nameservers, which can take >60s or hang entirely. ## Root Cause All resolver tests use `testContext()` with a 60-second timeout and perform real network DNS queries. The `go test` command in the Makefile has no timeout flag, so a hanging test blocks forever. ## Fix - Add `-short` and `-timeout 30s` flags to `go test` in `make check` - Skip real-DNS integration tests when `-short` is set - Context-canceled tests (no network needed) still run - Integration tests can be run explicitly: `go test -v -race ./internal/resolver/...` See PR #21.
sneak closed this issue 2026-03-01 21:10:39 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/dnswatcher#24