mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-06 05:53:08 -05:00
FreeBSD CI runs `cargo test --workspace`, which runs a crate's tests as threads of one process; Linux CI runs nextest, one process per test. Four vectorcraft-engine tests failed only in the shared process: - Events plug-ins are installed in the process-wide registry, so every installed one reacts to every session's changes and spends handlers of each session's frame budget (MAX_FRAME_HANDLERS, 4). With other tests' plug-ins installed at the same time, the plug-in a test counts on was left for a later frame and its handler never ran. a_plugin_installed_before_the_delivery_gets_no_earlier_events, a_save_reaches_the_plugin_when_its_document_closes_first and background_installs_during_a_drag_record_the_settled_baseline failed this way. The tests that install events plug-ins now hold a test lock (hold_event_plugins) while their session lives; sessions on one thread share it. - a_stale_placed_item_is_not_a_relative_object and a_stale_placed_item_is_refused_as_the_relative_object_of_move used the same fixture folder name, and each test empties its folder first, so one deleted the other's a.png. The second one now uses its own folder. `cargo test -p vectorcraft-engine --lib` on Linux reproduces all of them before this change.