towerops/test
Graham McIntire fc37680931
perf: optimize slow tests with bulk inserts and fewer iterations
Optimized the slowest tests to improve test suite performance:

1. Property-based IP validation test (6s → ~2.4s)
   - Reduced max_runs from 50 to 20 iterations
   - Still provides good coverage while being much faster

2. Database-heavy tests (~1s each)
   - Replaced individual create_check calls with bulk Repo.insert_all
   - Reduced check counts from 15 to 10 where adequate for testing
   - Fixed timestamp handling (truncate to :second for Ecto)
   - Fixed response_time_ms to use floats (schema requirement)
   - Removed updated_at (disabled in Check schema)
   - Tests affected:
     * get_device_latency_by_agent/2
     * get_uptime_percentage/1
     * get_latency_data/2 respects limit
     * AgentLatencyEvaluator tests

Expected speedup: ~40% reduction in top 10 slowest tests (12.8s → ~7.7s)

These optimizations maintain test coverage while significantly reducing
database transaction overhead.
2026-01-24 15:13:21 -06:00
..
integration import yamls 2026-01-21 14:30:04 -06:00
snmpkit improve credo 2026-01-23 18:21:40 -06:00
support use password for user regi 2026-01-21 09:13:08 -06:00
towerops perf: optimize slow tests with bulk inserts and fewer iterations 2026-01-24 15:13:21 -06:00
towerops_web add multiple cloud agents 2026-01-23 18:04:01 -06:00
test_helper.exs bring in snmpkit 2026-01-23 12:52:17 -06:00