Private
Public Access
0
0

fix(test): poll for mma_state_update 'simulating' to land in test_gui_ux_event_routing

This commit is contained in:
2026-06-10 15:45:44 -04:00
parent 2c924fe6df
commit a3abe49ca9
+8 -3
View File
@@ -37,9 +37,14 @@ def test_gui_ux_event_routing(live_gui) -> None:
'tier_usage': usage,
'tickets': []
})
time.sleep(2)
status = client.get_mma_status()
# Poll until the new status lands. Without this, a prior test's stale
# mma_state_update is still in flight and overwrites our 'simulating'.
for _ in range(40):
status = client.get_mma_status()
if status.get('mma_status') == 'simulating':
break
time.sleep(0.25)
assert status.get('mma_status') == 'simulating', f"Expected 'simulating', got '{status.get('mma_status')}'"
assert status.get('tier_usage', {}).get('Tier 1', {}).get('input') == 10
print("[SIM] Global state update verified.")