Skip to content

test: fix flaky permessage-deflate limit timeout#5229

Merged
metcoder95 merged 1 commit intomainfrom
fix-5185-flaky-permessage-deflate-limit
May 7, 2026
Merged

test: fix flaky permessage-deflate limit timeout#5229
metcoder95 merged 1 commit intomainfrom
fix-5185-flaky-permessage-deflate-limit

Conversation

@mcollina
Copy link
Copy Markdown
Member

@mcollina mcollina commented May 6, 2026

Description

Fixes a flaky websocket test introduced by the maxPayloadSize: 0 coverage.

The timeout path was calling t.fail(...), which is not available on the node:test context used here, so timeouts surfaced as TypeError: t.fail is not a function instead of a normal assertion failure.

This also reduces the test payload from 100 MB to 2 MB so the "limit disabled" case still exercises a payload above the smaller limits used elsewhere in the file without depending on a slow transfer in CI.

Fixes: #5185

Validation

  • ./node_modules/.bin/borp -p "test/websocket/permessage-deflate-limit.js"
  • npm run lint -- --fix-dry-run test/websocket/permessage-deflate-limit.js

Signed-off-by: Matteo Collina <hello@matteocollina.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5229   +/-   ##
=======================================
  Coverage   93.27%   93.27%           
=======================================
  Files         110      110           
  Lines       36353    36353           
=======================================
+ Hits        33907    33909    +2     
+ Misses       2446     2444    -2     

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

@metcoder95 metcoder95 merged commit 9d82667 into main May 7, 2026
35 checks passed
@metcoder95 metcoder95 deleted the fix-5185-flaky-permessage-deflate-limit branch May 7, 2026 08:37
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.

[flaky] test\websocket\permessage-deflate-limit.js

4 participants