Skip to content

chore: improve int summary counts when content-api is unavailable#16127

Merged
r1tsuu merged 1 commit into
payloadcms:mainfrom
GermanJablo:codex/fix-test-summary-skip-handling
Apr 1, 2026
Merged

chore: improve int summary counts when content-api is unavailable#16127
r1tsuu merged 1 commit into
payloadcms:mainfrom
GermanJablo:codex/fix-test-summary-skip-handling

Conversation

@GermanJablo

Copy link
Copy Markdown
Contributor

Summary

  • make test:int:summary resilient when PAYLOAD_DATABASE=content-api is configured but the content API service is not reachable
  • add fallback collection counting via vitest list --json so suites report 0/X instead of 0/0
  • keep totals stable by excluding explicit skipped tests (it.skip, test.skip, and mongoIt when not on mongodb) while preserving todo exclusion
  • add a content-api timeout guard per suite to avoid hanging runs

Validation

  • PAYLOAD_DATABASE=content-api pnpm test:int:summary now reports totals per suite (no more 0/0)
  • compared totals with and without explicit skip exclusion in this checkout:
    • without explicit skip exclusion: 4/1885
    • with explicit skip exclusion: 4/1879
    • delta: -6
  • PAYLOAD_DATABASE=content-api pnpm test:int was also checked to validate why parsing pending/skipped directly from failing runs is misleading (many tests become skipped/queued due early setup failure)

@GermanJablo GermanJablo changed the title fix(test): improve int summary counts when content-api is unavailable chore: improve int summary counts when content-api is unavailable Apr 1, 2026
@GermanJablo GermanJablo requested a review from r1tsuu April 1, 2026 17:08
@r1tsuu r1tsuu merged commit a65e715 into payloadcms:main Apr 1, 2026
163 of 164 checks passed
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

🚀 This is included in version v3.82.0

milamer pushed a commit to milamer/payload that referenced this pull request Apr 20, 2026
…yloadcms#16127)

## Summary
- make `test:int:summary` resilient when `PAYLOAD_DATABASE=content-api`
is configured but the content API service is not reachable
- add fallback collection counting via `vitest list --json` so suites
report `0/X` instead of `0/0`
- keep totals stable by excluding explicit skipped tests (`it.skip`,
`test.skip`, and `mongoIt` when not on mongodb) while preserving todo
exclusion
- add a content-api timeout guard per suite to avoid hanging runs

## Validation
- `PAYLOAD_DATABASE=content-api pnpm test:int:summary` now reports
totals per suite (no more `0/0`)
- compared totals with and without explicit skip exclusion in this
checkout:
  - without explicit skip exclusion: `4/1885`
  - with explicit skip exclusion: `4/1879`
  - delta: `-6`
- `PAYLOAD_DATABASE=content-api pnpm test:int` was also checked to
validate why parsing pending/skipped directly from failing runs is
misleading (many tests become skipped/queued due early setup failure)

Co-authored-by: German Jablonski <GermanJablo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants