fix(test): poll for mma_state_update 'simulating' to land in test_gui_ux_event_routing
This commit is contained in:
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user