Skip to content

fix cleanup of waitFor timers when an error occurs during onTimeout printout#1918

Open
ggilles wants to merge 11 commits into
callstack:mainfrom
ggilles:fix-timer-cleanup-bug
Open

fix cleanup of waitFor timers when an error occurs during onTimeout printout#1918
ggilles wants to merge 11 commits into
callstack:mainfrom
ggilles:fix-timer-cleanup-bug

Conversation

@ggilles

@ggilles ggilles commented Jun 15, 2026

Copy link
Copy Markdown

This is an attempt at fixing the timer cleanup bug described in #1917.

Summary

There are 2 fixes in there:

  • added a try/catch around processing onTimeout so that if an error happens while doing so (while dumping the screen for example), timers are still cleaned up
  • added cleanup of running timers when the top level timer expires.

Test plan

I included tests for both cases explained above. Very new to this codebase, so I'm not sure I'm doing it correctly. Forgive me is isn't suitable 🙏 .

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.42%. Comparing base (e5e8e37) to head (1ba06aa).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1918      +/-   ##
==========================================
+ Coverage   98.40%   98.42%   +0.02%     
==========================================
  Files          79       79              
  Lines        1501     1521      +20     
  Branches      414      401      -13     
==========================================
+ Hits         1477     1497      +20     
  Misses         24       24              

☔ View full report in Codecov by Harness.
📢 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.

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