towerops/test
Graham McIntire 20d63c408a perf: speed up test suite from 118s to 65s (45% faster) (#126)
Optimized slow tests by reducing unnecessary network timeouts and retry delays:

**PagerDuty tests (7.3s → 0.2s, 97% faster):**
- Added test-specific sleep/backoff configuration
- Use 1ms sleep instead of 1s/2s/4s exponential backoff in tests
- Maintains retry logic for production, fast tests in dev

**HTTP/UISP client tests (7s → <0.1s, 99% faster):**
- Disabled Req retry middleware in test environment
- Added 1s receive_timeout for test requests
- Prevents 7s retry delays on error status codes

**Ping executor tests (13s → 1.5s, 88% faster per test):**
- Reduced ping timeout from 6-10s to 0.5-1s for localhost
- Reduced timeout to 1s for unreachable hosts
- Still validates behavior, just faster

**Changes:**
- lib/towerops/pagerduty/client.ex: test-aware sleep/backoff
- lib/towerops/http.ex: disable retry in tests, 1s timeout
- lib/towerops/uisp/client.ex: disable retry in tests, 1s timeout
- test/towerops/monitoring/executors/ping_executor_test.exs: reduced timeouts

**Result:**
Total test time: 118.4s → 65.3s (45% improvement)
Top 10 slowest: 66.1s → 10.9s (83% improvement)

Reviewed-on: graham/towerops-web#126
2026-03-23 10:34:23 -05:00
..
integration routeros fixes and latency rounding 2026-02-09 17:30:06 -06:00
mix/tasks perf(test): optimize slow tests - 68% faster 2026-03-05 14:35:58 -06:00
snmpkit Rewrite polling_offset, changelog_parser, and user_agent_parser in Gleam (#103) 2026-03-21 10:11:06 -05:00
support add maintenance windows REST API and GraphQL support 2026-03-11 14:33:25 -05:00
towerops perf: speed up test suite from 118s to 65s (45% faster) (#126) 2026-03-23 10:34:23 -05:00
towerops_web fix: wrap Gaiia sync upserts in transaction and remove stale device_role_source ref (#118) 2026-03-22 16:47:17 -05:00
test_helper.exs complete overhaul of snmp engine to C nif 2026-01-30 12:27:12 -06:00
towerops_native_test.exs fix: resolve typing violation and ETS cache race in tests 2026-02-14 12:32:43 -06:00