Skip to content

test: change indexOf to includes in ecdh-disable - #9989

Closed
ancapaaron wants to merge 2 commits into
nodejs:masterfrom
ancapaaron:node_interactive_test
Closed

test: change indexOf to includes in ecdh-disable#9989
ancapaaron wants to merge 2 commits into
nodejs:masterfrom
ancapaaron:node_interactive_test

Conversation

@ancapaaron

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

test

Description of change

Updates test/parallel/test-tls-ecdh-disable.js on line 34 so that
assert.notEqual is changed to just assert. Then in place of indexOf,
includes() is used. The callback on line 31 has been wrapped in
common.mustCall() in order to ensure that this callback is only
made one time.

@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Dec 1, 2016
@mscdexmscdex added the tls Issues and PRs related to the tls subsystem. label Dec 1, 2016
Updates test/parallel/test-tls-ecdh-disable.js on line 34 so that
assert.notEqual is changed to just assert. Then in place of indexOf,
includes() is used. The callback on line 31 has been wrapped in
common.mustCall() in order to ensure that this callback is only
made one time.
@imyllerimyller added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Dec 1, 2016
@mscdex

Copy link
Copy Markdown
Contributor

nit: there's a typo in the commit message

@ancapaaronancapaaron changed the title test: change indexOf to includes in ecdh-disableetest: change indexOf to includes in ecdh-disableDec 1, 2016
@ancapaaron

Copy link
Copy Markdown
Author

@mscdex Thanks! I force pushed and updated.

cmd += ' -no_rand_screen';

exec(cmd, function(err, stdout, stderr) {
exec(cmd, common.mustCall(function(err, stdout, stderr) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This also needs a common.mustCall() on the server.listen() callback.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@cjihrig Went ahead and updated this. Thank you for the feedback.

Wraps the callback on the server.listen function in
common.mustCall.
@Trott

Trott commented Dec 9, 2016

Copy link
Copy Markdown
Member

@lpinca

Copy link
Copy Markdown
Member

@lpinca

Copy link
Copy Markdown
Member

Unrelated failure on SmartOS

not ok 468 parallel/test-http-connect
---
duration_ms: 0.534
severity: fail
stack: |-
events.js:160
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at exports._errnoException (util.js:1022:11)
at TCP.onread (net.js:572:26)
...

@lpinca

Copy link
Copy Markdown
Member

Landed in 885c80f.

Thanks!

@lpincalpinca closed this Dec 16, 2016
lpinca pushed a commit that referenced this pull request Dec 16, 2016
* use common.mustCall()
* use String.prototype.includes() instead of String.prototype.indexOf()
PR-URL: #9989
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
italoacasas pushed a commit that referenced this pull request Dec 17, 2016
* use common.mustCall()
* use String.prototype.includes() instead of String.prototype.indexOf()
PR-URL: #9989
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@italoacasasitaloacasas mentioned this pull request Dec 17, 2016
cjihrig pushed a commit that referenced this pull request Dec 20, 2016
* use common.mustCall()
* use String.prototype.includes() instead of String.prototype.indexOf()
PR-URL: #9989
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 22, 2017
* use common.mustCall()
* use String.prototype.includes() instead of String.prototype.indexOf()
PR-URL: #9989
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
* use common.mustCall()
* use String.prototype.includes() instead of String.prototype.indexOf()
PR-URL: #9989
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
* use common.mustCall()
* use String.prototype.includes() instead of String.prototype.indexOf()
PR-URL: #9989
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
* use common.mustCall()
* use String.prototype.includes() instead of String.prototype.indexOf()
PR-URL: #9989
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This was referenced Jan 24, 2017
MylesBorins pushed a commit that referenced this pull request Jan 31, 2017
* use common.mustCall()
* use String.prototype.includes() instead of String.prototype.indexOf()
PR-URL: #9989
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 1, 2017
* use common.mustCall()
* use String.prototype.includes() instead of String.prototype.indexOf()
PR-URL: #9989
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-and-learnIssues related to the Code-and-Learn events and PRs submitted during the events.testIssues and PRs related to the tests.tlsIssues and PRs related to the tls subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@ancapaaron@mscdex@Trott@lpinca@jasnell@cjihrig@MylesBorins@imyller@nodejs-github-bot