Files
coredns/test
Nikolaus Schuetz af1e34ebc8 test: poll instead of fixed sleeps across several tests (#8275)
Several tests slept a fixed duration then took a single snapshot of an
async result, racing whatever they waited on:
- forward health tests waited 20ms for the health-check goroutine to bump
  an atomic counter,
- the auto plugin tests (dns + metrics) waited 50-110ms for a file-watch
  reload to be picked up,
- the file ZoneReload test waited 30ms (self-described as could still be
  racy) for a reload,
- the overloaded health test slept 1s for its background goroutine to fire
  its first request.

Replace each with a bounded poll of the actual condition (the atomic
counter, a dns.Exchange response, a metrics scrape, z.ApexIfDefined, or a
channel signalled by the test's own handler) so they pass as soon as the
awaited state is reached and no longer flake when it is slower than the
fixed wait. Test-only.

Signed-off-by: Nikolaus Schuetz <nikolauspschuetz@gmail.com>
2026-07-10 15:20:57 -07:00
..
2019-10-01 07:41:29 +01:00
2025-12-17 19:08:59 -08:00
2025-12-17 19:08:59 -08:00
2025-12-17 19:08:59 -08:00
2018-07-19 16:23:06 +01:00
2020-09-24 18:14:41 +02:00
2023-08-10 11:06:48 -04:00