fix(test/whatsapp): use stale timestamp for append-skip test case#47224
fix(test/whatsapp): use stale timestamp for append-skip test case#47224rocky-d wants to merge 1 commit into
Conversation
The append recency filter added in 843e3c1 uses a 60s grace window (APPEND_RECENT_GRACE_MS). The existing test 'handles append messages by marking them read but skipping auto-reply' passed nowSeconds() as the message timestamp, meaning the message appeared as recent and was NOT skipped — causing the test to fail. Fix: use nowSeconds(-120_000) (2 minutes ago) to produce a clearly stale timestamp that falls outside the grace window, matching the test's intent.
Greptile SummaryThis PR fixes a broken test by correcting the message timestamp used in the After The fix sets the timestamp to
Confidence Score: 5/5
Last reviewed commit: c42339b |
|
All CI checks are passing ✅. This is a one-line fix that unblocks the |
|
Thanks @who96 for confirming — good to know this unblocks the |
|
All CI checks are green ✅ (25 passed, 10 skipped, 0 failed). However, the PR has conflicts with the base branch |
|
Thank you for the contribution @who96! We appreciate the effort. This PR's objective has been superseded by commit b2e9221 ("test(whatsapp): fix stale append inbox expectation", Mar 15) merged by maintainer Peter Steinberger. The upstream fix addresses the same issue with equivalent semantics. Closing as superseded. |
Bug
After #42588 (843e3c1) added
APPEND_RECENT_GRACE_MS = 60_000, the existing test'handles append messages by marking them read but skipping auto-reply'started failing.Root cause: The test passed
nowSeconds()(current time) asmessageTimestampfor a message that was supposed to be treated as stale history. With the new grace window, a message timestamped right now is considered recent, so the monitor processes it instead of skipping it — which is the opposite of what the test expects.Fix
Change the test's message timestamp from
nowSeconds()tonowSeconds(-120_000)(2 minutes ago), so it is clearly outside the 60-second grace window and gets skipped as intended.One line change. No behavior change — only test correctness fix.
Impact
Unblocks the
checks (node, channels)job which has been failing on multiple open PRs since 843e3c1 was merged.