-
-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Fixing #183 (spurious _on_connection_failure() after hard_close()) highlighted a gap in lori's test infrastructure: there's no way to control or simulate ASIO event sequences in unit tests.
The bug in #183 requires a specific event ordering to reproduce: connected → close → hard_close → disposable event → _try_shutdown(). This sequence happens naturally in real usage (reproduced via ponylang/postgres's TerminateSentOnClose test) but can't be triggered from a lori unit test because the ASIO event dispatch is opaque to test code.
Being able to simulate or inject ASIO events (readable, writeable, disposable, with controlled ordering) would make it possible to test edge cases in _event_notify and the shutdown state machine that are currently only exercisable through integration tests in downstream projects.