mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 11:22:24 +01:00
[scheduler] Fix cancellation of timers with empty string names (#9641)
This commit is contained in:
@@ -103,13 +103,14 @@ async def test_scheduler_heap_stress(
|
||||
|
||||
# Wait for all callbacks to execute (should be quick, but give more time for scheduling)
|
||||
try:
|
||||
await asyncio.wait_for(test_complete_future, timeout=60.0)
|
||||
await asyncio.wait_for(test_complete_future, timeout=10.0)
|
||||
except TimeoutError:
|
||||
# Report how many we got
|
||||
missing_ids = sorted(set(range(1000)) - executed_callbacks)
|
||||
pytest.fail(
|
||||
f"Stress test timed out. Only {len(executed_callbacks)} of "
|
||||
f"1000 callbacks executed. Missing IDs: "
|
||||
f"{sorted(set(range(1000)) - executed_callbacks)[:10]}..."
|
||||
f"{missing_ids[:20]}... (total missing: {len(missing_ids)})"
|
||||
)
|
||||
|
||||
# Verify all callbacks executed
|
||||
|
Reference in New Issue
Block a user