This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
test/internet/test-dns.js' service name test breaks on some machines #8047
Comments
Long term being able to mock out the apis and return specific results for these tests I think are attractive, but it's also not unreasonable for us to have requirements that slaves that run these tests have a well known configuration, that includes reading from /etc/services for a useful value to lookup So I'm going to suggest we go with option 2 for now, and I'll make sure each slave has at least something defined in there |
misterdjules
pushed a commit
to misterdjules/node
that referenced
this issue
Aug 6, 2014
Instead of hard-coding http service name in test-dns, retrieve it from /etc/services. This is not ideal, but it's still better than hard-coding it. Fixes nodejs#8047.
misterdjules
pushed a commit
to misterdjules/node
that referenced
this issue
Aug 6, 2014
Instead of hard-coding http service name in test-dns, retrieve it from /etc/services. This is not ideal, but it's still better than hard-coding it. Fixes nodejs#8047.
Don't pay attention to the current changes, I'm currently setting up a Windows dev environment to make this work on Windows too. Even if we don't run tests on windows with the nodejs-master job, I'd rather have them work right now than find out later. |
misterdjules
pushed a commit
to misterdjules/node
that referenced
this issue
Aug 9, 2014
Instead of hard-coding http service name in test-dns, retrieve it from /etc/services. This is not ideal, but it's still better than hard-coding it. Fixes nodejs#8047.
misterdjules
pushed a commit
to misterdjules/node
that referenced
this issue
Aug 9, 2014
Instead of hard-coding http service name in test-dns, retrieve it from /etc/services. This is not ideal, but it's still better than hard-coding it. Fixes nodejs#8047.
misterdjules
pushed a commit
to misterdjules/node
that referenced
this issue
Aug 12, 2014
Instead of hard-coding http service name in test-dns, retrieve it from /etc/services. This is not ideal, but it's still better than hard-coding it. Fixes nodejs#8047.
tjfontaine
pushed a commit
that referenced
this issue
Aug 12, 2014
Instead of hard-coding http service name in test-dns, retrieve it from /etc/services. This is not ideal, but it's still better than hard-coding it. Fixes #8047.
misterdjules
pushed a commit
to misterdjules/node
that referenced
this issue
Aug 12, 2014
Instead of hard-coding http service name in test-dns, retrieve it from /etc/services. This is not ideal, but it's still better than hard-coding it. Fixes nodejs#8047.
misterdjules
pushed a commit
to misterdjules/node
that referenced
this issue
Aug 12, 2014
Instead of hard-coding http service name in test-dns, retrieve it from /etc/services. This is not ideal, but it's still better than hard-coding it. Fixes nodejs#8047.
misterdjules
pushed a commit
to misterdjules/node
that referenced
this issue
Aug 12, 2014
Instead of hard-coding http service name in test-dns, retrieve it from /etc/services. This is not ideal, but it's still better than hard-coding it. Fixes nodejs#8047.
tjfontaine
pushed a commit
that referenced
this issue
Aug 13, 2014
Instead of hard-coding http service name in test-dns, retrieve it from /etc/services. This is not ideal, but it's still better than hard-coding it. Fixes #8047. Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
fiveisprime
pushed a commit
to fiveisprime/node
that referenced
this issue
Aug 17, 2014
Instead of hard-coding http service name in test-dns, retrieve it from /etc/services. This is not ideal, but it's still better than hard-coding it. Fixes nodejs#8047. Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2 tasks
Trott
added a commit
to Trott/io.js
that referenced
this issue
May 12, 2016
Replace lightly-used services file parsing in favor of confirming one of a small number of allowable values in service name lookup tests. In nodejs/node-v0.x-archive#8047, it was decided that this sort of service file parsing was superior to hardcoding acceptable values, but I'm not convinced: * No guarantee that the host uses /etc/services before, e.g., nscd. * Increases complexity of tests without guaranteeing robustness. I think that simply checking against a small set of expected values may be a better solution. Ideally, there would also be a unit test that used a test double for the appropriate `cares` function and confirms that it is called with the correct parameters, but now we're getting way ahead of ourselves.
Trott
added a commit
to Trott/io.js
that referenced
this issue
May 14, 2016
Replace lightly-used services file parsing in favor of confirming one of a small number of allowable values in service name lookup tests. In nodejs/node-v0.x-archive#8047, it was decided that this sort of service file parsing was superior to hardcoding acceptable values, but I'm not convinced: * No guarantee that the host uses /etc/services before, e.g., nscd. * Increases complexity of tests without guaranteeing robustness. I think that simply checking against a small set of expected values may be a better solution. Ideally, there would also be a unit test that used a test double for the appropriate `cares` function and confirms that it is called with the correct parameters, but now we're getting way ahead of ourselves. PR-URL: nodejs#6709 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
evanlucas
pushed a commit
to nodejs/node
that referenced
this issue
May 17, 2016
Replace lightly-used services file parsing in favor of confirming one of a small number of allowable values in service name lookup tests. In nodejs/node-v0.x-archive#8047, it was decided that this sort of service file parsing was superior to hardcoding acceptable values, but I'm not convinced: * No guarantee that the host uses /etc/services before, e.g., nscd. * Increases complexity of tests without guaranteeing robustness. I think that simply checking against a small set of expected values may be a better solution. Ideally, there would also be a unit test that used a test double for the appropriate `cares` function and confirms that it is called with the correct parameters, but now we're getting way ahead of ourselves. PR-URL: #6709 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In this test:
The following assert:
fails on some of our jenkins nodes because the service name for port 80 can be different than "http". Possible names include "80" and "www". This is usually read by
getnameinfo
from/etc/services
(strace/dtrace confirm this) but I think it may also be read fromnscd
depending on the system's configuration.We could work around this issue by hard coding the most common values in the test, but I think we have an opportunity to make the test more robust.
There are several solutions, and I'd like to get your feedback and your suggestions:
before running the test so that we know the actual service name as it is setup on the system that runs it. The problem with this approach is that as mentioned earlier, the service name could be read from nscd and not /etc/services. I'm not sure about that though, it would need some confirmation, I'm still looking into that.
What do you guys think?
The text was updated successfully, but these errors were encountered: