trevoro / node-named

DNS Server in node.js
MIT License
356 stars 100 forks source link

named.test.js unittest failing #24

Open AaronNGray opened 7 years ago

AaronNGray commented 7 years ago

Run on Debian 8.5 with 'dig' available.

~/GitHub/node-named/test$ nodeunit named.test.js

named.test.js
Error: bind EINVAL 0.0.0.0:1153
    at Object.exports._errnoException (util.js:1050:11)
    at exports._exceptionWithHostPort (util.js:1073:20)
    at _handle.lookup (dgram.js:215:18)
    at _combinedTickCallback (internal/process/next_tick.js:83:11)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)

FAILURES: Undone tests (or their setups/teardowns): 
- listen and close (port only)

To fix this, make sure all tests call test.done()
AaronNGray commented 7 years ago

Failing with same results on Windows 10 with 'dig' command available.

trevoro commented 7 years ago

Hey Aaron,

Thats quite strange; it seems as though something else is listening on port 1153 as well. Can you check to see if that's the case? Otherwise I'm not seeing any failures here using node 8.

What version of node and npm are you using on these platforms?

trevoro commented 7 years ago

Oh I had something bad in my repo; will take a look! Great find.

AaronNGray commented 7 years ago

solved !

clue is here :- https://github.com/trevoro/node-named/issues/20#issuecomment-293929144

https://github.com/trevoro/node-named/blob/master/lib/server.js#L53 https://github.com/trevoro/node-named/blob/master/lib/server.js#L74

need to test address type ip4/ip6 and act accordingly.

gtato commented 6 years ago

So is there any good reason why this change is not pushed?