- Replace Process.sleep(N) with explicit synchronization:
render(view) to force LV mailbox drain, PubSub assert_receive for
leader election, and render_hook sync guarantees
- Add batch_packet_fixtures/2 using Repo.insert_all for bulk test
fixtures (200 inserts -> 1 round trip)
- Remove sleeps from historical_loading_test — tests query DB
directly, don't need LV async processing
The integration tests were failing because historical packets weren't
loading automatically. The tests needed to properly trigger the bounds
update event after the map initializes.
Changes:
- Add PostGIS location field to packet fixtures when lat/lon are provided
- Execute JavaScript to manually trigger bounds update after map loads
- This ensures the sendBoundsToServer function is called
- Adjusted timing to wait for map initialization before triggering
This should make the integration tests more reliable by ensuring
historical packets are loaded after the map is ready.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>