ComfyUI/tests-unit/app_test
Deep Mehta 63784baed5 fix(server): serialize PromptMetadataStore access with a lock
Addresses comfyanonymous's review nit on PR #13905. The store is touched
from three threads — the aiohttp event loop (``register`` via
``post_prompt``), the worker thread (``unregister`` via the
``prompt_worker`` try/finally and ``execution_error`` paths), and any
thread that fires ``send_sync`` (``inject``). Individual ``dict``
operations are GIL-atomic but ``register``'s ``len -> pop -> setitem``
and ``inject``'s ``get -> {**a, **b}`` are multi-step compounds whose
interleaving without a lock is racy. A single ``threading.Lock`` keeps
the FIFO cap honest and snapshots the envelope under the lock before
the spread runs.

Adds a stress-test that runs concurrent register/unregister/inject for
100 ms across five threads and asserts no exception escapes and the
capacity bound is held.
2026-05-14 21:26:06 -07:00
..
__init__.py Add FrontendManager to manage non-default front-end impl (#3897) 2024-07-16 11:26:11 -04:00
custom_node_manager_test.py [i18n] Add /i18n endpoint to provide all custom node translations (#6558) 2025-01-22 17:15:45 -05:00
frontend_manager_test.py Generalize frontend version warning to all comfy* requirements.txt entries (#13875) 2026-05-14 16:13:30 -07:00
model_manager_test.py Support preview images embedded in safetensors metadata (#6119) 2024-12-19 14:01:56 -08:00
node_replace_manager_test.py fix: make NodeReplaceManager.register() idempotent (#13596) 2026-05-07 19:21:12 -07:00
test_migrations.py feat(assets): align local API with cloud spec (#12863) 2026-03-16 12:34:04 -07:00
test_prompt_metadata.py fix(server): serialize PromptMetadataStore access with a lock 2026-05-14 21:26:06 -07:00
user_manager_system_user_test.py feat(security): add System User protection with __ prefix (#10966) 2025-11-28 21:28:42 -05:00