test: make test-http-unix-socket use common.PIPE

Don't unlink the socket, that's the responsibility of libuv and/or node.
pull/22966/head
Ben Noordhuis 2011-07-21 21:25:46 +02:00
parent 725fcf5587
commit 4b77626add
1 changed files with 2 additions and 10 deletions

View File

@ -24,8 +24,6 @@ var assert = require('assert');
var fs = require('fs'); var fs = require('fs');
var http = require('http'); var http = require('http');
var SOCKET = common.tmpDir + '/http.sock';
var status_ok = false; // status code == 200? var status_ok = false; // status code == 200?
var headers_ok = false; var headers_ok = false;
var body_ok = false; var body_ok = false;
@ -39,10 +37,10 @@ var server = http.createServer(function(req, res) {
res.end(); res.end();
}); });
server.listen(SOCKET, function() { server.listen(common.PIPE, function() {
var options = { var options = {
socketPath: SOCKET, socketPath: common.PIPE,
path: '/' path: '/'
}; };
@ -76,12 +74,6 @@ server.listen(SOCKET, function() {
}); });
server.on('close', function() {
try {
fs.unlinkSync(SOCKET);
} catch (e) {}
});
process.on('exit', function() { process.on('exit', function() {
server.close(); server.close();
assert.ok(status_ok); assert.ok(status_ok);