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
{{ message }}
Repository navigation
add unit test coverage for Python InternalQueue #6440
amber/src/main/python/core/models/internal_queue.py implements the Python worker's central InternalQueue. It routes incoming elements into per-channel sub-queues (control channels registered at higher priority than data channels, non-queue-elements going to the SYSTEM sub-queue) and implements reason-tracked data-side disabling: data queues are disabled for a reason (DISABLE_BY_PAUSE or DISABLE_BY_BACKPRESSURE) and only re-enabled once every disable reason has been cleared.
The queue has no dedicated test. Several test files construct an InternalQueue as scaffolding, and test_main_loop.py calls disable_data/enable_data only to drive main-loop pause/resume — but no test asserts the queue's own semantics: only DISABLE_BY_PAUSE is ever used, and DISABLE_BY_BACKPRESSURE and the multi-reason disable tracking are never exercised anywhere in the test tree.
Note that the underlying LinkedBlockingMultiQueue already has a dedicated test (amber/src/test/python/core/util/customized_queue/test_linked_blocking_multi_queue.py, added in #4782), and test_pause_manager.py only asserts PauseManager's own is_paused() flag. This issue targets the layer neither of them covers: InternalQueue's per-channel routing (control vs. data priority, SYSTEM sub-queue, ValueError on unrecognized elements) and its reason-tracked disable_data/enable_data semantics.
Activity
eugenegujing commentedon Jul 15, 2026
/take
test(pyamber): add unit test coverage for InternalQueue (apache#6444)