Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5ada45b

Browse filesBrowse files
Trottrvagg
authored andcommitted
test: replace deprecated util.debug() calls
common.debug() is just util.debug() and emits a deprecation notice. Per docs, use console.error() instead. PR-URL: #3082 Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
1 parent 6ee5d0f commit 5ada45b
Copy full SHA for 5ada45b
Expand file treeCollapse file tree

24 files changed

+61
-62
lines changed
Open diff view settings
Collapse file

‎test/disabled/test-sendfd.js‎

Copy file name to clipboardExpand all lines: test/disabled/test-sendfd.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ var logChild = function(d) {
5252

5353
d.split('\n').forEach(function(l) {
5454
if (l.length > 0) {
55-
common.debug('CHILD: ' + l);
55+
console.error('CHILD: ' + l);
5656
}
5757
});
5858
};
Collapse file

‎test/parallel/test-file-read-noexist.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-file-read-noexist.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ fs.readFile(filename, 'raw', function(err, content) {
1010
if (err) {
1111
got_error = true;
1212
} else {
13-
common.debug('cat returned some content: ' + content);
14-
common.debug('this shouldn\'t happen as the file doesn\'t exist...');
13+
console.error('cat returned some content: ' + content);
14+
console.error('this shouldn\'t happen as the file doesn\'t exist...');
1515
assert.equal(true, false);
1616
}
1717
});
Collapse file

‎test/parallel/test-fs-realpath.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-fs-realpath.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ function test_deep_symlink_mix(callback) {
326326
[fixturesAbsDir + '/nested-index/two/realpath-c',
327327
'../../../' + common.tmpDirName + '/cycles/root.js']
328328
].forEach(function(t) {
329-
//common.debug('setting up '+t[0]+' -> '+t[1]);
330329
try { fs.unlinkSync(t[0]); } catch (e) {}
331330
fs.symlinkSync(t[1], t[0]);
332331
unlink.push(t[0]);
Collapse file

‎test/parallel/test-http-after-connect.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-after-connect.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var serverRequests = 0;
88
var clientResponses = 0;
99

1010
var server = http.createServer(function(req, res) {
11-
common.debug('Server got GET request');
11+
console.error('Server got GET request');
1212
req.resume();
1313
++serverRequests;
1414
res.writeHead(200);
@@ -18,7 +18,7 @@ var server = http.createServer(function(req, res) {
1818
}, 50);
1919
});
2020
server.on('connect', function(req, socket, firstBodyChunk) {
21-
common.debug('Server got CONNECT request');
21+
console.error('Server got CONNECT request');
2222
serverConnected = true;
2323
socket.write('HTTP/1.1 200 Connection established\r\n\r\n');
2424
socket.resume();
@@ -33,7 +33,7 @@ server.listen(common.PORT, function() {
3333
path: 'google.com:80'
3434
});
3535
req.on('connect', function(res, socket, firstBodyChunk) {
36-
common.debug('Client got CONNECT response');
36+
console.error('Client got CONNECT response');
3737
socket.end();
3838
socket.on('end', function() {
3939
doRequest(0);
@@ -49,7 +49,7 @@ function doRequest(i) {
4949
port: common.PORT,
5050
path: '/request' + i
5151
}, function(res) {
52-
common.debug('Client got GET response');
52+
console.error('Client got GET response');
5353
var data = '';
5454
res.setEncoding('utf8');
5555
res.on('data', function(chunk) {
Collapse file

‎test/parallel/test-http-connect.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-connect.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var server = http.createServer(function(req, res) {
1212
server.on('connect', function(req, socket, firstBodyChunk) {
1313
assert.equal(req.method, 'CONNECT');
1414
assert.equal(req.url, 'google.com:443');
15-
common.debug('Server got CONNECT request');
15+
console.error('Server got CONNECT request');
1616
serverGotConnect = true;
1717

1818
socket.write('HTTP/1.1 200 Connection established\r\n\r\n');
@@ -40,7 +40,7 @@ server.listen(common.PORT, function() {
4040
});
4141

4242
req.on('connect', function(res, socket, firstBodyChunk) {
43-
common.debug('Client got CONNECT request');
43+
console.error('Client got CONNECT request');
4444
clientGotConnect = true;
4545

4646
// Make sure this request got removed from the pool.
Collapse file

‎test/parallel/test-http-expect-continue.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-expect-continue.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var got_continue = false;
1111

1212
function handler(req, res) {
1313
assert.equal(sent_continue, true, 'Full response sent before 100 Continue');
14-
common.debug('Server sending full response...');
14+
console.error('Server sending full response...');
1515
res.writeHead(200, {
1616
'Content-Type' : 'text/plain',
1717
'ABCD' : '1'
@@ -21,7 +21,7 @@ function handler(req, res) {
2121

2222
var server = http.createServer(handler);
2323
server.on('checkContinue', function(req, res) {
24-
common.debug('Server got Expect: 100-continue...');
24+
console.error('Server got Expect: 100-continue...');
2525
res.writeContinue();
2626
sent_continue = true;
2727
setTimeout(function() {
@@ -38,11 +38,11 @@ server.on('listening', function() {
3838
path: '/world',
3939
headers: { 'Expect': '100-continue' }
4040
});
41-
common.debug('Client sending request...');
41+
console.error('Client sending request...');
4242
outstanding_reqs++;
4343
var body = '';
4444
req.on('continue', function() {
45-
common.debug('Client got 100 Continue...');
45+
console.error('Client got 100 Continue...');
4646
got_continue = true;
4747
req.end(test_req_body);
4848
});
@@ -54,7 +54,7 @@ server.on('listening', function() {
5454
res.setEncoding('utf8');
5555
res.on('data', function(chunk) { body += chunk; });
5656
res.on('end', function() {
57-
common.debug('Got full response.');
57+
console.error('Got full response.');
5858
assert.equal(body, test_res_body, 'Response body doesn\'t match.');
5959
assert.ok('abcd' in res.headers, 'Response headers missing.');
6060
outstanding_reqs--;
Collapse file

‎test/parallel/test-http-legacy.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-legacy.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ server.listen(common.PORT, function() {
5454
responses_recvd += 1;
5555
res.setEncoding('utf8');
5656
res.on('data', function(chunk) { body0 += chunk; });
57-
common.debug('Got /hello response');
57+
console.error('Got /hello response');
5858
});
5959

6060
setTimeout(function() {
@@ -65,16 +65,16 @@ server.listen(common.PORT, function() {
6565
responses_recvd += 1;
6666
res.setEncoding('utf8');
6767
res.on('data', function(chunk) { body1 += chunk; });
68-
common.debug('Got /world response');
68+
console.error('Got /world response');
6969
});
7070
}, 1);
7171
});
7272

7373
process.on('exit', function() {
74-
common.debug('responses_recvd: ' + responses_recvd);
74+
console.error('responses_recvd: ' + responses_recvd);
7575
assert.equal(2, responses_recvd);
7676

77-
common.debug('responses_sent: ' + responses_sent);
77+
console.error('responses_sent: ' + responses_sent);
7878
assert.equal(2, responses_sent);
7979

8080
assert.equal('The path was /hello', body0);
Collapse file

‎test/parallel/test-http-pause.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-pause.js
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ var expectedClient = 'Response Body from Server';
99
var resultClient = '';
1010

1111
var server = http.createServer(function(req, res) {
12-
common.debug('pause server request');
12+
console.error('pause server request');
1313
req.pause();
1414
setTimeout(function() {
15-
common.debug('resume server request');
15+
console.error('resume server request');
1616
req.resume();
1717
req.setEncoding('utf8');
1818
req.on('data', function(chunk) {
1919
resultServer += chunk;
2020
});
2121
req.on('end', function() {
22-
common.debug(resultServer);
22+
console.error(resultServer);
2323
res.writeHead(200);
2424
res.end(expectedClient);
2525
});
@@ -32,16 +32,16 @@ server.listen(common.PORT, function() {
3232
path: '/',
3333
method: 'POST'
3434
}, function(res) {
35-
common.debug('pause client response');
35+
console.error('pause client response');
3636
res.pause();
3737
setTimeout(function() {
38-
common.debug('resume client response');
38+
console.error('resume client response');
3939
res.resume();
4040
res.on('data', function(chunk) {
4141
resultClient += chunk;
4242
});
4343
res.on('end', function() {
44-
common.debug(resultClient);
44+
console.error(resultClient);
4545
server.close();
4646
});
4747
}, 100);
Collapse file

‎test/parallel/test-http-pipe-fs.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-pipe-fs.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ var server = http.createServer(function(req, res) {
3131
}
3232
}, function(res) {
3333
res.on('end', function() {
34-
common.debug('res' + i + ' end');
34+
console.error('res' + i + ' end');
3535
if (i === 2) {
3636
server.close();
3737
}
3838
});
3939
res.resume();
4040
});
4141
req.on('socket', function(s) {
42-
common.debug('req' + i + ' start');
42+
console.error('req' + i + ' start');
4343
});
4444
req.end('12345');
4545
}(i + 1));
Collapse file

‎test/parallel/test-http-set-timeout.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-set-timeout.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var server = http.createServer(function(req, res) {
1010
assert.ok(s instanceof net.Socket);
1111
req.connection.on('timeout', function() {
1212
req.connection.destroy();
13-
common.debug('TIMEOUT');
13+
console.error('TIMEOUT');
1414
server.close();
1515
});
1616
});

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.