Skip to content

test: add deeper tests for Queue correctness - #3

Merged
usernane merged 1 commit into
mainfrom
dev
Jun 1, 2026
Merged

test: add deeper tests for Queue correctness#3
usernane merged 1 commit into
mainfrom
dev

Conversation

@usernane

@usernane usernane commented Jun 1, 2026

Copy link
Copy Markdown
Member

Summary

Add 6 new tests verifying correct results for retry exhaustion, pending count accuracy, fail reason preservation, priority ordering, process return value, and flush behavior.

How to Test / Verify

php vendor/bin/phpunit tests/

26 tests, 54 assertions (up from 20/38).

Breaking Changes and Migration Steps

None. Test-only changes.

Checklist

  • I reviewed my own diff before requesting review
  • My commits follow Conventional Commits
  • The title of the pull request follows Conventional Commits
  • I added/updated tests (or explained why not)
  • I updated docs (if needed)
  • I ran lint/cs-fixer (if applicable)
  • I considered backward compatibility
  • I considered security

Related issues

N/A

- Test max attempts exhausted moves to failed with correct reason/count
- Test getPendingCount accuracy through dispatch/process lifecycle
- Test getFailed preserves fail reason and job ID
- Test priority ordering (high priority processed first)
- Test process() returns correct count of processed jobs
- Test flush only removes failed jobs, not pending

26 tests, 54 assertions (up from 20/38)
@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.98%. Comparing base (410634c) to head (d67a63a).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main       #3   +/-   ##
=========================================
  Coverage     95.98%   95.98%           
  Complexity       71       71           
=========================================
  Files             4        4           
  Lines           224      224           
=========================================
  Hits            215      215           
  Misses            9        9           
Flag Coverage Δ
php-8.1 95.87% <ø> (ø)
php-8.2 95.98% <ø> (ø)
php-8.3 95.98% <ø> (ø)
php-8.4 95.98% <ø> (ø)
php-8.5 95.98% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud

sonarqubecloud Bot commented Jun 1, 2026

Copy link
Copy Markdown

@usernane
usernane merged commit 7f541a3 into main Jun 1, 2026
20 checks passed
@usernane
usernane deleted the dev branch June 1, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant