feat(test): add E2E notification delivery lifecycle tests#154
Merged
Abd-Standard merged 2 commits intoJun 22, 2026
Merged
Conversation
- Covers full success path, partial delivery, webhook failure, retry exhaustion, and ordering guarantees - Updates CI workflow with E2E test suite stage - Adds jest dependency for testing framework Closes Core-Foundry#141
The 'logs permanent failure after retry exhaustion' test had the same ordering bug as the first retry test: jest.useFakeTimers() was called AFTER retryQueue.start(), so the real setInterval registered by start() was never intercepted by the fake timer queue. advanceTimersByTimeAsync advanced fake timers but the real setInterval fired independently, causing flaky timing and ultimately 1 of 2 expected fetches. Same root-cause fix as commit (move useFakeTimers + setSystemTime before the retryQueue.start() call). Also removes the temporary retry_debug.test.ts scratch file. All 289 tests in the listener suite now pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements comprehensive end-to-end tests for the notification delivery lifecycle, covering all critical paths outlined in issue #141.
Tests Covered
Changes
listener/src/__tests__/notification-delivery-lifecycle.e2e.test.ts(410 lines) — full test suitelistener/package.json— added jest + ts-jest dependencieslistener/package-lock.json— lockfile updated.github/workflows/ci.yml— added E2E test suite stageNotes
Closes #141