-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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: mock dns lookup function in parallel tests #17296
Conversation
These tests should not make any DNS calls. The lookup would fail when the DNS requests are hijacked and time out instead of erroring out.
These failures happened to me again when I was on the hotel wifi. We should just mock the requests. |
I totally agree with that. |
Generally agree, but I'm 👍 on mocks/test doubles being D.R.Y. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. If it's easy/quick enough to do, it might be worth comparing a coverage run with and without these changes to see if this loses anything in terms of coverage of the lib/dns.js
code.
@Trott I think if the coverage decreases we would need to write other tests for that (or it would be ideal if we can run the internet tests on the coverage machine & a testing CI job). |
node-test-commit-linux-linked failed but didn't look related...trying a new one: https://ci.nodejs.org/job/node-test-commit-linux-linked/374/ |
PR-URL: #17296 Refs: nodejs/help#687 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
These tests should not make any DNS calls. The lookup would fail when the DNS requests are hijacked and time out instead of erroring out. PR-URL: #17296 Refs: nodejs/help#687 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #17296 Refs: nodejs/help#687 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
These tests should not make any DNS calls. The lookup would fail when the DNS requests are hijacked and time out instead of erroring out. PR-URL: #17296 Refs: nodejs/help#687 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #17296 Refs: nodejs/help#687 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
These tests should not make any DNS calls. The lookup would fail when the DNS requests are hijacked and time out instead of erroring out. PR-URL: #17296 Refs: nodejs/help#687 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #17296 Refs: nodejs/help#687 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
These tests should not make any DNS calls. The lookup would fail when the DNS requests are hijacked and time out instead of erroring out. PR-URL: #17296 Refs: nodejs/help#687 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
Should this be backported to |
PR-URL: nodejs#17296 Refs: nodejs/help#687 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
These tests should not make any DNS calls. The lookup would fail when the DNS requests are hijacked and time out instead of erroring out. PR-URL: nodejs#17296 Refs: nodejs/help#687 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #17296 Backport-PR-URL: #19706 Refs: nodejs/help#687 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
These tests should not make any DNS calls. The lookup would fail when the DNS requests are hijacked and time out instead of erroring out. PR-URL: #17296 Backport-PR-URL: #19706 Refs: nodejs/help#687 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test
These tests should not make any DNS calls. The lookup would fail when the DNS requests are hijacked and time out instead of erroring out.
Refs: nodejs/help#687
Refs: #14781 (comment)