From 4b77626add4591c6d3aeb5fbd010fb173a5ef8ce Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 21 Jul 2011 21:25:46 +0200 Subject: [PATCH] test: make test-http-unix-socket use common.PIPE Don't unlink the socket, that's the responsibility of libuv and/or node. --- test/simple/test-http-unix-socket.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/test/simple/test-http-unix-socket.js b/test/simple/test-http-unix-socket.js index d43f573c017..2a002332f5c 100644 --- a/test/simple/test-http-unix-socket.js +++ b/test/simple/test-http-unix-socket.js @@ -24,8 +24,6 @@ var assert = require('assert'); var fs = require('fs'); var http = require('http'); -var SOCKET = common.tmpDir + '/http.sock'; - var status_ok = false; // status code == 200? var headers_ok = false; var body_ok = false; @@ -39,10 +37,10 @@ var server = http.createServer(function(req, res) { res.end(); }); -server.listen(SOCKET, function() { +server.listen(common.PIPE, function() { var options = { - socketPath: SOCKET, + socketPath: common.PIPE, path: '/' }; @@ -76,12 +74,6 @@ server.listen(SOCKET, function() { }); -server.on('close', function() { - try { - fs.unlinkSync(SOCKET); - } catch (e) {} -}); - process.on('exit', function() { server.close(); assert.ok(status_ok);