diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-02-05 11:46:47 +0100 |
---|---|---|
committer | Rod Vagg <rod@vagg.org> | 2016-06-15 14:27:05 +1000 |
commit | 1a1ff77feb3ed003e71bcbd066deadcaf9a82652 (patch) | |
tree | 54a9bf0f770ca40a51ca44986cc1307f665f19ec /test/parallel/test-net-connect-immediate-finish.js | |
parent | f914f37742a1d22c70cc650b720739b1f25d3cf3 (diff) | |
download | android-node-v8-1a1ff77feb3ed003e71bcbd066deadcaf9a82652.tar.gz android-node-v8-1a1ff77feb3ed003e71bcbd066deadcaf9a82652.tar.bz2 android-node-v8-1a1ff77feb3ed003e71bcbd066deadcaf9a82652.zip |
test: fix test-net-* error code check for getaddrinfo(3)
Replace '...' as invalid hostname with '***', which will give a more
consisten error message on different systems. The hostname '...' returns
EAI_AGAIN on musl libc and EAI_NONAME on most other systems.
By changing the testcase we get same restult on all known platforms.
PR-URL: https://github.com/nodejs/node/pull/5099
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Diffstat (limited to 'test/parallel/test-net-connect-immediate-finish.js')
-rw-r--r-- | test/parallel/test-net-connect-immediate-finish.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-net-connect-immediate-finish.js b/test/parallel/test-net-connect-immediate-finish.js index a5403732ec..6114233677 100644 --- a/test/parallel/test-net-connect-immediate-finish.js +++ b/test/parallel/test-net-connect-immediate-finish.js @@ -3,14 +3,14 @@ const common = require('../common'); const assert = require('assert'); const net = require('net'); -const client = net.connect({host: '...', port: common.PORT}); +const client = net.connect({host: '***', port: common.PORT}); client.once('error', common.mustCall(function(err) { assert(err); assert.strictEqual(err.code, err.errno); assert.strictEqual(err.code, 'ENOTFOUND'); assert.strictEqual(err.host, err.hostname); - assert.strictEqual(err.host, '...'); + assert.strictEqual(err.host, '***'); assert.strictEqual(err.syscall, 'getaddrinfo'); })); |