You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Skip persistent macOS-headless engine-state lag in #316 flake-prone tests
Per #316 acceptance criterion #2: after 12+ fix attempts the Camera2D
`make_current` → `Viewport.camera_2d` slot propagation still occasionally
lags on macOS headless. The handler-side logical-current bookkeeping (#311)
stays correct in that race; only the engine-side viewport slot lags. The
test polls 200 ms (#341 widened diagnostics) but observed lag has been up
to ~600 ms in the wild — beyond any reasonable wait budget for a unit test.
Add `_skip_if_macos_engine_lag(cam, expected, report, label)`:
- if the wait already settled → noop, caller continues
- if not on macOS headless → noop, caller's hard assertion fails normally
- if handler logical state disagrees with expectation → noop (real regression,
caller's hard assertion fires with the diagnostic)
- only when on macOS headless AND handler state agrees → skip() with the full
diagnostic message so the next investigator still sees the divergence
Wired into `test_create_with_make_current_unmarks_sibling` and the four poll
sites in `test_configure_current_sibling_unmark_single_undo`. Linux / Windows
behavior is unchanged — those platforms still hard-fail on a missed propagation.
This intentionally does NOT close the underlying race: it converts the known
upstream-flavor flake into a soft signal so CI stops reporting noise on it.
The diagnostic-rich skip message keeps the failure visible enough that any
NEW divergence (e.g. a real handler regression) still surfaces.
Refs: #316
assert_eq(first_node.is_current(), false, "Previously-current camera should have been unmarked. Direct is_current mismatch after wait succeeded. %s"%_camera_current_diag(first_node, false, first_not_current.attempts, first_not_current.elapsed_msec))
assert_eq(second_node.is_current(), false, "After undo second should not be current. %s"%_camera_current_diag(second_node, false, undo_second_not_current.attempts, undo_second_not_current.elapsed_msec))
426
488
assert_eq(first_node.is_current(), true, "Single undo should restore original current camera. %s"%_camera_current_diag(first_node, true, undo_first_current.attempts, undo_first_current.elapsed_msec))
0 commit comments