Skip to content
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

test: fix test-buffer-slow #9809

Closed
wants to merge 1 commit into from
Closed

Conversation

targos
Copy link
Member

@targos targos commented Nov 26, 2016

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.

@targos targos 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
Member Author

targos commented Nov 27, 2016

@targos targos force-pushed the fix-test-buffer-slow branch 2 times, most recently from 7438e14 to fbef147 Compare November 27, 2016 16:10
Fix incorrect use of string instead of RegExp in `throws` assertions.
@targos
Copy link
Member Author

targos commented Nov 27, 2016

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

@targos
Copy link
Member Author

targos commented Nov 29, 2016

Landed in efcbf61

@targos targos 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>
@Fishrock123 Fishrock123 mentioned this pull request Dec 5, 2016
2 tasks
@MylesBorins
Copy link
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
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
Member

I think it's better not backport this too.

@targos
Copy link
Member Author

targos commented Dec 22, 2016

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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants