Skip to content

test: restore no-op function in test#14065

Closed
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:restore-noop
Closed

test: restore no-op function in test#14065
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:restore-noop

Conversation

@Trott
Copy link
Copy Markdown
Member

@Trott Trott commented Jul 3, 2017

Remove common.mustCall() in test that might connect to a server already
running on the local host.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test http

Remove common.mustCall() in test that might connect to a server already
running on the local host.
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jul 3, 2017
@Trott
Copy link
Copy Markdown
Member Author

Trott commented Jul 3, 2017

@Trott
Copy link
Copy Markdown
Member Author

Trott commented Jul 3, 2017

OK to fast-track this one as trivial and important to fix tests?

Copy link
Copy Markdown
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

OK to fast-track this one as trivial and important to fix tests?

I would say so – I can’t really tell how many other people have a server on port 80 running regularly on the machine on which they run tests.

@Trott
Copy link
Copy Markdown
Member Author

Trott commented Jul 3, 2017

assert.doesNotThrow(() => {
http.request({hostname: v}).on('error', common.mustCall()).end();
http.request({host: v}).on('error', common.mustCall()).end();
http.request({hostname: v}).on('error', () => {}).end();
Copy link
Copy Markdown
Contributor

@refack refack Jul 3, 2017

Choose a reason for hiding this comment

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

Maybe add a comment that we don't care about the connection just about hostname type checking?
Maybe even go as far as:

const dontCare = () => {};
http.request({hostname: v}).on('error', dontCare).end();
http.request({host: v}).on('error', dontCare).end();

Just so no one revert-reverts this

@Trott
Copy link
Copy Markdown
Member Author

Trott commented Jul 4, 2017

Landed in 5b1d12a

@Trott Trott closed this Jul 4, 2017
Trott added a commit to Trott/io.js that referenced this pull request Jul 4, 2017
Remove common.mustCall() in test that might connect to a server already
running on the local host.

PR-URL: nodejs#14065
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
addaleax pushed a commit that referenced this pull request Jul 11, 2017
Remove common.mustCall() in test that might connect to a server already
running on the local host.

PR-URL: #14065
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@addaleax addaleax mentioned this pull request Jul 11, 2017
addaleax pushed a commit that referenced this pull request Jul 18, 2017
Remove common.mustCall() in test that might connect to a server already
running on the local host.

PR-URL: #14065
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Fishrock123 pushed a commit that referenced this pull request Jul 19, 2017
Remove common.mustCall() in test that might connect to a server already
running on the local host.

PR-URL: #14065
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@Trott Trott deleted the restore-noop branch January 13, 2022 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Issues and PRs related to the tests.

7 participants