FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: add tests for dnsPromises.lookup by shisama · Pull Request #21559 · nodejs/node · GitHub

/ node Public

test: add tests for dnsPromises.lookup - #21559

Closed
shisama wants to merge 2 commits into
nodejs:masterfrom
shisama:test-dnsPromises-lookup
Closed

test: add tests for dnsPromises.lookup#21559
shisama wants to merge 2 commits into
nodejs:masterfrom
shisama:test-dnsPromises-lookup

Conversation

shisama commented Jun 27, 2018

Copy link
Copy Markdown
Contributor

Added tests for dnsPromises.lookup to increase coverage and test
onlookup() and onlookupall() methods.

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

nodejs-github-bot added the test Issues and PRs related to the tests. label Jun 27, 2018

cjihrig left a comment

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

There are already tests for these things in the internet suite. Unfortunately, those don't count toward code coverage.

shisama commented Jun 27, 2018

Copy link
Copy Markdown
Contributor Author

@cjihrig Code coverage report for internal/dns/promises.js(
27/06/2018 03:26)
shows lines of uncovered code.
This adds tests to cover code in onlookup() and onlookupall().

jasnell commented Jun 29, 2018

Copy link
Copy Markdown
Member

CI: https://ci.nodejs.org/job/node-test-pull-request/15671/

shisama commented Jul 15, 2018
edited
Loading

Copy link
Copy Markdown
Contributor Author

@cjihrig I found the tests for these in internet. Please tell me which tests for dns should be in internet or the others. The tests in internet don't run on CI.

cjihrig commented Jul 16, 2018

Copy link
Copy Markdown
Contributor

Generally, tests that require the Internet should be in the internet suite. Those tests are more prone to network issues, but unfortunately are not run as part of the normal CI.

shisama commented Jul 16, 2018
edited
Loading

Copy link
Copy Markdown
Contributor Author

Thanks for your reply. OK, I'll fix this.

shisama commented Aug 1, 2018

Copy link
Copy Markdown
Contributor Author

@cjihrig The tests that require the Internet were removed. But tests to check error with invalid host name are remained to improve coverage. Please take a look again.

jasnell commented Aug 12, 2018

Copy link
Copy Markdown
Member

Masashi Hirano added 2 commits August 14, 2018 01:21
Added tests for dnsPromises.lookup to increase coverage and test
`onlookup()` and `onlookupall()` methods.
shisama force-pushed the test-dnsPromises-lookup branch from 490df72 to 116f6eb Compare August 13, 2018 16:22

shisama commented Aug 13, 2018

Copy link
Copy Markdown
Contributor Author

@jasnell node-test-commit-freebsd fails but I think it is not related to this. I'm not sure if it will be success, but I rebased this. Would you please run CI again?

jasnell commented Aug 13, 2018

Copy link
Copy Markdown
Member

freebsd re-build: https://ci.nodejs.org/job/node-test-commit-freebsd/19630/

shisama commented Aug 14, 2018

Copy link
Copy Markdown
Contributor Author

@jasnell Thank you to run CI again, but it failed. I think it is related to #17849 (flaky test).

BridgeAR added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Aug 23, 2018

Copy link
Copy Markdown
Member

refack commented Aug 23, 2018

Copy link
Copy Markdown
Contributor

Generally, tests that require the Internet should be in the internet suite. Those tests are more prone to network issues, but unfortunately are not run as part of the normal CI.

@addaleax did a wonderful job of writing a mock DNS server in common/dns.js, for example:

const dnstools = require('../common/dns');

Copy link
Copy Markdown
Member

Landed in 2118342

addaleax closed this Aug 24, 2018
addaleax pushed a commit that referenced this pull request Aug 24, 2018
Added tests for dnsPromises.lookup to increase coverage and test
`onlookup()` and `onlookupall()` methods.

PR-URL: #21559
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
targos pushed a commit that referenced this pull request Aug 24, 2018
Added tests for dnsPromises.lookup to increase coverage and test
`onlookup()` and `onlookupall()` methods.

PR-URL: #21559
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

Copy link
Copy Markdown
Member

The remaining test cases still rely on internet access and will fail if the DNS is hijacked by the ISP. I move them to internet in #22516

targos pushed a commit that referenced this pull request Sep 3, 2018
Added tests for dnsPromises.lookup to increase coverage and test
`onlookup()` and `onlookupall()` methods.

PR-URL: #21559
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

refack commented Sep 10, 2018

Copy link
Copy Markdown
Contributor


You can finally see the improved coverage in our published report 🥇

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL