towerops/test/towerops/monitoring
Graham McIntire b1c803e1d2 test: cut runtime on slow tests, fix time-sensitive flake
Performance:
- HealthController: honor `:timeout` from `:redis` config (was hardcoded
  2s) so the 503-when-unreachable test exits immediately
- DevicePollerBranches: drop `collect_events` window 1500ms → 100ms
  (PubSub broadcasts are synchronous from `run_perform`)
- Towerops.Unused: cache xref analysis in `:persistent_term` keyed by
  BEAM mtimes so repeated `mix unused` invocations skip re-analysis
- DiscoveryWorker: make wait_loop interval configurable via
  `:discovery_wait_interval_ms` (25ms in tests vs 500ms in prod)
- ProfileWatcher: configurable `:profile_reloader` so tests can stub
  the YAML reload instead of paying the full disk-load cost
- PingExecutor: tag the loopback test `:network` (it shells out to
  `ping`); coverage already provided by 4 other `:network`-tagged tests

Flake fix:
- FrequencyChange tests used hardcoded `~U[2026-05-09 12:00:00Z]`,
  which now falls outside the rule's 24h lookback window. Switched to
  `DateTime.utc_now()` so scans stay inside the window regardless of
  clock progression.
2026-05-10 10:39:36 -05:00
..
executors test: cut runtime on slow tests, fix time-sensitive flake 2026-05-10 10:39:36 -05:00
check_query_test.exs test: lift coverage to 87.14% via targeted branch tests 2026-05-09 11:44:25 -05:00
executor_test.exs test: add security, recovery code, and URL validation test coverage 2026-03-14 15:13:13 -05:00
monitoring_check_test.exs refactor/dry-improvements (#202) 2026-03-28 10:56:34 -05:00
ping_test.exs test: fix slow + flaky tests (Mox global, env pollution, pool starvation) 2026-05-08 14:43:30 -05:00