Skip to content

fix(mock): honor configurable flushInterval in SnapshotRecorder#5040

Open
deepview-autofix wants to merge 1 commit intonodejs:mainfrom
deepview-autofix:deepview/e043066db7
Open

fix(mock): honor configurable flushInterval in SnapshotRecorder#5040
deepview-autofix wants to merge 1 commit intonodejs:mainfrom
deepview-autofix:deepview/e043066db7

Conversation

@deepview-autofix
Copy link
Copy Markdown
Contributor

The SnapshotRecorder constructor accepted a flushInterval option (and documented a 30s default), but #scheduleFlush always used a hardcoded 1000ms timeout, so the option had no effect on auto-flush timing.

Use this.flushInterval in #scheduleFlush so the configured value actually controls how often snapshots are written to disk.

The SnapshotRecorder constructor accepted a `flushInterval` option (and
documented a 30s default), but `#scheduleFlush` always used a hardcoded
1000ms timeout, so the option had no effect on auto-flush timing.

Use `this.flushInterval` in `#scheduleFlush` so the configured value
actually controls how often snapshots are written to disk.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: DeepView Autofix <276251120+deepview-autofix@users.noreply.github.com>
Co-Authored-By: Nikita Skovoroda <chalkerx@gmail.com>
Signed-off-by: Nikita Skovoroda <chalkerx@gmail.com>
Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.03%. Comparing base (bc0a19c) to head (b1c01ba).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5040      +/-   ##
==========================================
- Coverage   93.03%   93.03%   -0.01%     
==========================================
  Files         110      110              
  Lines       35793    35793              
==========================================
- Hits        33301    33300       -1     
- Misses       2492     2493       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mcollina
Copy link
Copy Markdown
Member

there is a CI failure that is relevant

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.

3 participants