Skip to content

Stabilize ASan/UBSan rate limiter persistence test by removing hard-coded stale timestamp - #4

Merged
fnoopv merged 2 commits into
mainfrom
copilot/fix-asan-ubsan-job-failure
Nov 3, 2026
Merged

fnoopv merged 2 commits into
mainfrom
copilot/fix-asan-ubsan-job-failure

Conversation

Copilot AI commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

The ASan + UBSan CI job was failing due to a time-dependent test in TestRateLimiter::enforcesWindowAndPersists(). The test used a fixed historical timestamp that can fall outside SyncRateLimiter’s 7-day retention window, causing persisted entries to be pruned on reload and the assertion to fail.

  • Root cause

    • SyncRateLimiter::load() prunes old history (pruneAll()), but the test seeded data with a fixed date (2026-10-18), making behavior dependent on wall-clock time.
  • Change

    • Updated the test to derive start from current UTC time (now - 1 day) instead of a fixed calendar date.
    • Preserves test intent (window enforcement + persistence) while removing calendar drift/flakiness.
  • Code snippet

    - const QDateTime start(QDate(2026, 10, 18), QTime(2, 0), QTimeZone::utc());
    + const QDateTime start = QDateTime::currentDateTimeUtc().addDays(-1);

Co-authored-by: fnoopv <24599198+fnoopv@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job ASan + UBSan Stabilize ASan/UBSan rate limiter persistence test by removing hard-coded stale timestamp Nov 3, 2026
Copilot AI requested a review from fnoopv November 3, 2026 08:51
@fnoopv
fnoopv marked this pull request as ready for review November 3, 2026 08:57
@fnoopv
fnoopv merged commit 737bc96 into main Nov 3, 2026
4 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.

2 participants