automated tests

Closes #3581728

● All tests pass. Here's a summary of what was created:

5 test files, all under web/modules/composer/queue_stats/test/src/Unit/:

  1. MonitoredQueueTest (10 tests) — verifies the decorator proxies correctly, dispatches the right events on claim/delete/release, skips events when appropriate (failed claim, failed release), and handles garbage collection conditionally.
  2. ProcessingRateTest (6 tests) — covers rate calculation from completion timestamps, negative rate protection for parallel processing, formatValue scaling (items/second vs items/minute), reset, and event subscriptions.
  3. ProcessingTimeTest (8 tests) — covers start/completion tracking per item_id, duration calculation, ignoring completions without a start, zero-duration protection, independent tracking of multiple concurrent items, date formatting delegation, and reset.
  4. QueueTimeTest (6 tests) — covers wait time calculation from item->created, EMA averaging across multiple items, date formatting, and reset.
  5. EstimatedTimeToFinishTest (5 tests) — covers the numberOfItems / processingRate calculation, division-by-zero guard, empty queue case, and date formatting.

Plus the existing ExponentialMovingAverageTest (4 tests) was already there.

Edited by Ben Stallings

Merge request reports

Loading
Loading