• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rm-hull / dot-block / 26727174512
47%

Build:
DEFAULT BRANCH: main
Ran 31 May 2026 11:10PM UTC
Jobs 1
Files 20
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 May 2026 11:08PM UTC coverage: 43.484% (+0.5%) from 42.938%
26727174512

push

github

web-flow
feat: implement upstream connection pooling (#127)

* feat: implement upstream connection pooling

- Introduce `ConnPool` to reuse DNS upstream connections.
- Add `--connection-pool-size` flag (default 10) to configure the pool.
- Add `dns_pool_evictions_total` metric to track pool capacity issues.
- Refactor `RoundRobinClient` to manage pools per upstream.

* fix: prevent panic on multiple DNSCache Close calls

- Protect `done` channel closure with `sync.Once`.
- Switch local test DNS server to TCP to prevent race conditions during
port allocation.
- Use `ConnPool` for health checks instead of re-instantiating
`dns.Client` in `RoundRobinClient`.

* feat: implement connection idle timeout in ConnPool

- Add `maxIdleAge` to `ConnPool` to expire idle connections after 8s.
- Refactor `acquire` and `release` logic to encapsulate connection
  lifecycle management and stale connection cleanup.
- Remove redundant upstream entries in `main.go`.

* feat: add validation for connection pool size

Ensure the connection pool size is a non-negative integer to prevent
invalid configurations during client initialization.

* refactor: remove redundant sync.Once and fix test leaks

- Removed `sync.Once` from `DNSCache.Close()` as it is unnecessary for
  closing a single-use channel.
- Moved `cache`, `metrics`, and `dnsClient` initialization inside the
  test cases in `TestDNSDispatcher_QueryLogging` to ensure each test
  instance uses a fresh cache and prevents cross-test interference.

* test: fix race condition in local DNS test server

Updated `startLocalDNS` to pass an already-bound listener to the DNS
server. This prevents race conditions where the port might be grabbed
by another process between `net.Listen` and `ListenAndServe`.

* Update internal/forwarder/round_robin_client.go

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* fix: retry once on reused connection failure

If a connection acquired from the p... (continued)

46 of 85 new or added lines in 4 files covered. (54.12%)

644 of 1481 relevant lines covered (43.48%)

1189.63 hits per line

Uncovered Changes

Lines Coverage ∆ File
31
49.52
8.06% internal/forwarder/round_robin_client.go
7
0.0
0.0% internal/app.go
1
0.0
0.0% main.go
Jobs
ID Job ID Ran Files Coverage
1 26727174512.1 31 May 2026 11:10PM UTC 20
43.48
GitHub Action Run
Source Files on build 26727174512
  • Tree
  • List 20
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • f4f0224f on github
  • Prev Build on main (#26725516311)
  • Next Build on main (#26746646219)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc