Skip to content

test: fix test-buffer-slow - #9809

Closed
targos wants to merge 1 commit into
nodejs:masterfrom
targos:fix-test-buffer-slow
Closed

test: fix test-buffer-slow#9809
targos wants to merge 1 commit into
nodejs:masterfrom
targos:fix-test-buffer-slow

Conversation

@targos

Copy link
Copy Markdown
Member
Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test, buffer

Description of change

Fix incorrect use of string instead of RegExp in throws assertions.

@targostargos added buffer Issues and PRs related to the buffer subsystem. test Issues and PRs related to the tests. labels Nov 26, 2016
@targos

Copy link
Copy Markdown
MemberAuthor

@targos
targosforce-pushed the fix-test-buffer-slow branch 2 times, most recently from 7438e14 to fbef147CompareNovember 27, 2016 16:10
Fix incorrect use of string instead of RegExp in `throws` assertions.
@targos
targosforce-pushed the fix-test-buffer-slow branch from fbef147 to 58c0078CompareNovember 27, 2016 16:10
@targos

Copy link
Copy Markdown
MemberAuthor

@mhdawsonmhdawson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@targos

Copy link
Copy Markdown
MemberAuthor

Landed in efcbf61

@targostargos closed this Nov 29, 2016
@targos
targos deleted the fix-test-buffer-slow branch November 29, 2016 12:24
targos added a commit that referenced this pull request Nov 29, 2016
Fix incorrect use of string instead of RegExp in `throws` assertions.
PR-URL: #9809
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
addaleax pushed a commit that referenced this pull request Dec 5, 2016
Fix incorrect use of string instead of RegExp in `throws` assertions.
PR-URL: #9809
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@Fishrock123Fishrock123 mentioned this pull request Dec 5, 2016
2 tasks
@MylesBorins

Copy link
Copy Markdown
Contributor

@targos the test cherry-picks to v6.x but with a failing test

=== release test-buffer-slow ===
Path: parallel/test-buffer-slow
assert.js:355
throw actual;
^
RangeError: Invalid typed array length
at Buffer.Uint8Array (native)
at FastBuffer (buffer.js:11:5)
at createUnsafeBuffer (buffer.js:38:12)
at SlowBuffer (buffer.js:159:10)
at /Users/thealphanerd/code/node/v6.x/test/parallel/test-buffer-slow.js:53:3
at _tryBlock (assert.js:314:5)
at _throws (assert.js:333:12)
at Function.assert.throws (assert.js:363:3)
at Object.<anonymous> (/Users/thealphanerd/code/node/v6.x/test/parallel/test-buffer-slow.js:52:8)
at Module._compile (module.js:570:32)
Command: out/Release/node /Users/thealphanerd/code/node/v6.x/test/parallel/test-buffer-slow.js

v4.x will require a manual backport

@addaleax

Copy link
Copy Markdown
Member

I would suggest not backporting it then, the underlying cause of the different error messages has been fixed in #10152 (which has been labelled semver-major).

If somebody does want to backport this manually to v6.x or v4.x, I think they will want to do something like #9924.

/cc @joyeecheung just fyi

@joyeecheung

Copy link
Copy Markdown
Member

I think it's better not backport this too.

@targos

Copy link
Copy Markdown
MemberAuthor

We can "backport" it by just passing the RangeError error constructor instead of a string

targos added a commit to targos/node that referenced this pull request Dec 26, 2016
Fix incorrect use of string instead of RegExp in `throws` assertions.
PR-URL: nodejs#9809
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
targos added a commit to targos/node that referenced this pull request Dec 26, 2016
Fix incorrect use of string instead of RegExp in `throws` assertions.
PR-URL: nodejs#9809
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
targos added a commit that referenced this pull request Dec 27, 2016
Fix incorrect use of string instead of RegExp in `throws` assertions.
PR-URL: #9809
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This was referenced Dec 27, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bufferIssues and PRs related to the buffer subsystem.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@targos@MylesBorins@addaleax@joyeecheung@Trott@princejwesley@cjihrig@mhdawson