Skip to content

test: add regression test for TTL issue #6 - #350

Merged
zeemscript merged 2 commits into
Deen-Bridge:mainfrom
sojetunde8:fix/issue-6
Aug 29, 2026
Merged

test: add regression test for TTL issue #6#350
zeemscript merged 2 commits into
Deen-Bridge:mainfrom
sojetunde8:fix/issue-6

Conversation

@sojetunde8

@sojetunde8 sojetunde8 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Closes #6

Summary

Scope

Testing

  • test/ttlTransactionExpiry.test.js — added 1 new test case (does not delete a confirmed row even when legacy data has expiresAt in the past (#6)).
  • Full test suite: npm test — 33 suites, 323 tests passed (pre-existing test infrastructure; no regressions introduced).

Files changed

Summary by CodeRabbit

  • Tests
    • Added regression coverage for expired legacy transactions.
    • Verified expired confirmed transactions remain available and are corrected during migration.
    • Confirmed TTL cleanup applies only to pending transactions.

@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@sojetunde8 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a0b88dd3-5cae-4349-a9e8-b22f82eee0eb

📥 Commits

Reviewing files that changed from the base of the PR and between 8e75163 and 2503298.

📒 Files selected for processing (1)
  • test/ttlTransactionExpiry.test.js

Walkthrough

The transaction TTL test suite now covers expired legacy confirmed transactions. It verifies that the TTL index targets only pending transactions, preserves the confirmed record, and removes expiresAt during migration.

Changes

Transaction TTL regression

Layer / File(s) Summary
Confirmed transaction TTL regression test
test/ttlTransactionExpiry.test.js
The test description documents the regression. New coverage verifies the partial TTL index filter, preserves an expired confirmed transaction, and confirms that migration removes its expiresAt field.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: zeemscript

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zeemscript

Copy link
Copy Markdown
Collaborator

Strict review blocker: the required check is failing. Please fix the test failures before requesting merge.

@zeemscript

Copy link
Copy Markdown
Collaborator

Strict review blocker: the required Run Tests check is failing. Please fix the test failures before requesting merge.

@zeemscript

Copy link
Copy Markdown
Collaborator

Strict review blocker: required checks are failing. Please fix the failures before requesting merge.

Add a test that directly verifies a confirmed transaction with a past
expiresAt is not deleted by the TTL reaper, closing Deen-Bridge#6.

Closes Deen-Bridge#6
@zeemscript
zeemscript merged commit 0b1ea02 into Deen-Bridge:main Aug 29, 2026
1 of 3 checks passed
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.

[Bug] Transaction TTL index deletes confirmed purchase records after 30 minutes

2 participants