Skip to content

test: deflake test-buffer-large-size-buffer-alloc #58734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

lpinca
Copy link
Member

@lpinca lpinca commented Jun 16, 2025

Use the error message as another condition to skip the test when the buffer allocation fails.

Refs: 795dd8eb7988ae38553e
Refs: e9c6004a2d580008082b

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Jun 16, 2025
@lpinca
Copy link
Member Author

lpinca commented Jun 16, 2025

This should fix https://ci.nodejs.org/job/node-test-binary-windows-js-suites/34823/RUN_SUBSET=3,nodes=win11-COMPILED_BY-vs2022_clang/testReport/junit/(root)/pummel/test_buffer_large_size_buffer_alloc/

---
duration_ms: 159.008
exitcode: 1
severity: fail
stack: |-
  c:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-buffer-large-size-buffer-alloc.js:15
      throw e;
      ^

  AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
  + actual - expected

  + Comparison {}
  - Comparison {
  -   code: 'ERR_STRING_TOO_LONG'
  - }

      at Object.<anonymous> (c:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-buffer-large-size-buffer-alloc.js:12:10)
      at Module._compile (node:internal/modules/cjs/loader:1691:14)
      at Object..js (node:internal/modules/cjs/loader:1823:10)
      at Module.load (node:internal/modules/cjs/loader:1426:32)
      at Module._load (node:internal/modules/cjs/loader:1249:12)
      at TracingChannel.traceSync (node:diagnostics_channel:322:14)
      at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
      at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:152:5)
      at node:internal/main/run_main_module:33:47 {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: RangeError: Array buffer allocation failed
        at new ArrayBuffer (<anonymous>)
        at new Uint8Array (<anonymous>)
        at new FastBuffer (node:internal/buffer:968:5)
        at Buffer.alloc (node:buffer:399:10)
        at assert.throws.code (c:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-buffer-large-size-buffer-alloc.js:12:30)
        at getActual (node:assert:505:5)
        at ok.throws (node:assert:651:24)
        at Object.<anonymous> (c:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-buffer-large-size-buffer-alloc.js:12:10)
        at Module._compile (node:internal/modules/cjs/loader:1691:14)
        at Object..js (node:internal/modules/cjs/loader:1823:10),
    expected: { code: 'ERR_STRING_TOO_LONG' },
    operator: 'throws'
  }

  Node.js v25.0.0-pre
...

Use the error message as another condition to skip the test when the
buffer allocation fails.

Refs: nodejs@795dd8eb7988ae38553e
Refs: nodejs@e9c6004a2d580008082b
@lpinca lpinca force-pushed the deflake/test-buffer-large-size-buffer-alloc branch from 6a9c2a7 to 8f1319a Compare June 16, 2025 20:23
Copy link

codecov bot commented Jun 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.15%. Comparing base (b23648e) to head (8f1319a).
Report is 60 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58734      +/-   ##
==========================================
- Coverage   90.15%   90.15%   -0.01%     
==========================================
  Files         636      637       +1     
  Lines      187891   188121     +230     
  Branches    36879    36892      +13     
==========================================
+ Hits       169386   169592     +206     
+ Misses      11272    11266       -6     
- Partials     7233     7263      +30     

see 61 files with indirect coverage changes

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

@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 17, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 17, 2025
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@lpinca lpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 18, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 18, 2025
@nodejs-github-bot nodejs-github-bot merged commit 214e4db into nodejs:main Jun 18, 2025
60 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 214e4db

@lpinca lpinca deleted the deflake/test-buffer-large-size-buffer-alloc branch June 18, 2025 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants