Skip to content

fix(cli/unstable): speed up ProgressBarStream tests#7193

Merged
bartlomieju merged 2 commits into
denoland:mainfrom
minato32:fix/6674-progress-bar-test-speed
Jun 29, 2026
Merged

fix(cli/unstable): speed up ProgressBarStream tests#7193
bartlomieju merged 2 commits into
denoland:mainfrom
minato32:fix/6674-progress-bar-test-speed

Conversation

@minato32

Copy link
Copy Markdown
Contributor

Closes #6674.

ProgressBarStream() flushes and ProgressBarStream() cancels slept 500–1000ms between each of 10 chunks, so each test took ~5–10s — almost all of it idle. The sleeps don't gate the assertion: it only checks that the writable side ends with a newline (`0x0a`), which is emitted by bar.stop() regardless of how many interval ticks fired.

Drop the per-chunk delay to 5ms and override interval: 1 on the progress bar so the ticking path still exercises but doesn't dominate runtime. The two tests now run in ~110ms combined instead of ~15s.

@github-actions github-actions Bot added the cli label Jun 24, 2026
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.64%. Comparing base (f0431c2) to head (3da7c12).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7193   +/-   ##
=======================================
  Coverage   94.64%   94.64%           
=======================================
  Files         629      630    +1     
  Lines       51895    51898    +3     
  Branches     9373     9374    +1     
=======================================
+ Hits        49116    49119    +3     
  Misses       2211     2211           
  Partials      568      568           

☔ 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.

@bartlomieju bartlomieju merged commit 6d5aea1 into denoland:main Jun 29, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ProgressBarStream() flushes test case takes too long time to pass

3 participants