From 876712a0749abf40d93d2546ad81a97fd37b8ba2 Mon Sep 17 00:00:00 2001 From: Henry Rawas Date: Thu, 14 Jul 2011 13:59:37 -0700 Subject: [PATCH] test-tcp-wrap dont assume port 80 priveleged' --- test/simple/test-tcp-wrap.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/simple/test-tcp-wrap.js b/test/simple/test-tcp-wrap.js index 32208ef74e..58d3ac1b59 100644 --- a/test/simple/test-tcp-wrap.js +++ b/test/simple/test-tcp-wrap.js @@ -5,14 +5,14 @@ var TCP = process.binding('tcp_wrap').TCP; var handle = new TCP(); -// Cannot bind to port 80 because of access rights. -var r = handle.bind("0.0.0.0", 80); -assert.equal(-1, r); -console.log(errno); -assert.equal(errno, "EACCESS"); - // Should be able to bind to the common.PORT var r = handle.bind("0.0.0.0", common.PORT); assert.equal(0, r); +// Should not be able to bind to the same port again +var r = handle.bind("0.0.0.0", common.PORT); +assert.equal(-1, r); +console.log(errno); +assert.equal(errno, "EINVAL"); + handle.close();