Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

test: address timing issues in simple http tests #9432

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions test/simple/test-http-default-encoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,11 @@ var server = http.Server(function(req, res) {
req.on('data', function(chunk) {
result += chunk;
}).on('end', function() {
clearTimeout(timeout);
server.close();
res.writeHead(200);
res.end('hello world\n');
});

var timeout = setTimeout(function() {
process.exit(1);
}, 100);

res.writeHead(200);
res.end('hello world\n');
});

server.listen(common.PORT, function() {
Expand Down
4 changes: 2 additions & 2 deletions test/simple/test-http-request-end.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ var server = http.Server(function(req, res) {

req.on('end', function() {
server.close();
res.writeHead(200);
res.end('hello world\n');
});

res.writeHead(200);
res.end('hello world\n');
});

server.listen(common.PORT, function() {
Expand Down