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: change indexOf to includes in ecdh-disable #9989

Closed
wants to merge 2 commits into from

Conversation

ancapaaron
Copy link

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-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Dec 1, 2016
@mscdex mscdex 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.
@imyller imyller 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
Contributor

mscdex commented Dec 1, 2016

nit: there's a typo in the commit message

@ancapaaron ancapaaron changed the title test: change indexOf to includes in ecdh-disablee test: change indexOf to includes in ecdh-disable Dec 1, 2016
@ancapaaron
Copy link
Author

@mscdex Thanks! I force pushed and updated.

@@ -28,10 +28,10 @@ server.listen(0, '127.0.0.1', function() {
if (common.isWindows)
cmd += ' -no_rand_screen';

exec(cmd, function(err, stdout, stderr) {
exec(cmd, common.mustCall(function(err, stdout, stderr) {
Copy link
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
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
Copy link
Member

Trott commented Dec 9, 2016

@lpinca
Copy link
Member

lpinca commented Dec 16, 2016

@lpinca
Copy link
Member

lpinca commented Dec 16, 2016

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
Member

lpinca commented Dec 16, 2016

Landed in 885c80f.

Thanks!

@lpinca lpinca 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>
@italoacasas italoacasas 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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. test Issues and PRs related to the tests. tls Issues and PRs related to the tls subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants