test: add regression test for TTL issue #6 - #350
Conversation
|
@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! 🚀 |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughThe 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 ChangesTransaction TTL regression
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Strict review blocker: the required check is failing. Please fix the test failures before requesting merge. |
|
Strict review blocker: the required |
|
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
25bc746 to
0d8e674
Compare
Closes #6
Summary
expiresAtdefault) was already merged via PR fix(transactions): prevent TTL index from deleting confirmed purchases and donations (#94) #103 (which closed duplicate issue [Bug] Confirmed purchases and donations deleted by the Transaction TTL index #94).expiresAtis not deleted by the TTL reaper.partialFilterExpression: { status: "pending" }prevents the reaper from matching confirmed rows, and that the migration clears staleexpiresAtvalues.Scope
src/models/Transaction.js,src/controllers/stellar/paymentController.js, and related files.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)).npm test— 33 suites, 323 tests passed (pre-existing test infrastructure; no regressions introduced).Files changed
test/ttlTransactionExpiry.test.js— Added explicit regression test for issue [Bug] Transaction TTL index deletes confirmed purchase records after 30 minutes #6 and updated describe block to reference the issue.Summary by CodeRabbit