aprs.me/test/aprsme/convert_test.exs
Graham McIntire a8e7b17ee1
Optimize test suite performance - 32.5% faster execution
Reduced test execution time from 21.2s to 14.3s through multiple optimizations:

1. Reduced test data size:
   - Memory efficiency test: 5000→1000 packets, smaller payloads (saved ~3.2s)
   - More focused test scenarios without sacrificing coverage

2. Reduced sleep times across test suite:
   - GPS movement tests: 100-500ms → 10-100ms
   - Broadcast supervisor tests: 50ms → 10ms
   - Packet consumer tests: 100-500ms → 20-50ms
   - Saved ~1-2 seconds total

3. Enabled parallel test execution:
   - Set max_cases to System.schedulers_online() * 2
   - Made DeviceIdentificationTest async
   - Made PasscodeTest and ConvertTest async
   - Better CPU utilization

4. Reduced assertion timeouts:
   - Changed from 1000ms to 200-500ms where appropriate
   - Faster failure detection

These optimizations maintain test reliability while significantly reducing
execution time. The occasional timing-sensitive LiveView test failures are
addressed with slightly more generous timeouts where needed.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 09:23:07 -05:00

23 lines
484 B
Elixir

defmodule Aprsme.ConvertTest do
use ExUnit.Case, async: true
alias Aprsme.Convert
describe "wind/3" do
test "converts ultimeter mph" do
assert Convert.wind(55, :ultimeter, :mph) == 3.417541556
end
end
describe "temp/3" do
test "converts ultimeter f" do
assert Convert.temp(55, :ultimeter, :f) == 5.5
end
end
describe "speed/3" do
test "converts knots to mph" do
assert Convert.speed(55, :knots, :mph) == 63.29
end
end
end