diff options
author | Rich Trott <rtrott@gmail.com> | 2015-09-26 15:00:51 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2015-10-07 11:13:38 -0700 |
commit | 099cfbc58cb95b221cbbd49c6d161eae316c752d (patch) | |
tree | dab846bbcef89323ca1e3adb2fd05db383e935b9 /test/sequential | |
parent | a334ddc467af6bfb3a93245a7e6f571c8dd01fa2 (diff) | |
download | node-new-099cfbc58cb95b221cbbd49c6d161eae316c752d.tar.gz |
test: remove deprecated error logging
common.error() is just deprecated util.error() renamed.
Remove calls to it and some other extraneous console logging
in tests.
PR-URL: https://github.com/nodejs/node/pull/3079
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test/sequential')
-rw-r--r-- | test/sequential/test-pump-file2tcp-noexist.js | 9 | ||||
-rw-r--r-- | test/sequential/test-pump-file2tcp.js | 7 |
2 files changed, 2 insertions, 14 deletions
diff --git a/test/sequential/test-pump-file2tcp-noexist.js b/test/sequential/test-pump-file2tcp-noexist.js index 9dbbda2dfa..66d1e1119f 100644 --- a/test/sequential/test-pump-file2tcp-noexist.js +++ b/test/sequential/test-pump-file2tcp-noexist.js @@ -11,14 +11,12 @@ var got_error = false; var conn_closed = false; var server = net.createServer(function(stream) { - common.error('pump!'); util.pump(fs.createReadStream(fn), stream, function(err) { - common.error('util.pump\'s callback fired'); if (err) { got_error = true; } else { - console.error('util.pump\'s callback fired with no error'); - console.error('this shouldn\'t happen as the file doesn\'t exist...'); + // util.pump's callback fired with no error + // this shouldn't happen as the file doesn't exist... assert.equal(true, false); } server.close(); @@ -29,7 +27,6 @@ server.listen(common.PORT, function() { var conn = net.createConnection(common.PORT); conn.setEncoding('utf8'); conn.on('data', function(chunk) { - common.error('recv data! nchars = ' + chunk.length); buffer += chunk; }); @@ -38,7 +35,6 @@ server.listen(common.PORT, function() { }); conn.on('close', function() { - common.error('client connection close'); conn_closed = true; }); }); @@ -48,5 +44,4 @@ var buffer = ''; process.on('exit', function() { assert.equal(true, got_error); assert.equal(true, conn_closed); - console.log('exiting'); }); diff --git a/test/sequential/test-pump-file2tcp.js b/test/sequential/test-pump-file2tcp.js index 86effb7c6c..f5949085e0 100644 --- a/test/sequential/test-pump-file2tcp.js +++ b/test/sequential/test-pump-file2tcp.js @@ -10,10 +10,7 @@ var fn = path.join(common.fixturesDir, 'elipses.txt'); var expected = fs.readFileSync(fn, 'utf8'); var server = net.createServer(function(stream) { - common.error('pump!'); util.pump(fs.createReadStream(fn), stream, function() { - common.error('server stream close'); - common.error('server close'); server.close(); }); }); @@ -22,16 +19,12 @@ server.listen(common.PORT, function() { var conn = net.createConnection(common.PORT); conn.setEncoding('utf8'); conn.on('data', function(chunk) { - common.error('recv data! nchars = ' + chunk.length); buffer += chunk; }); conn.on('end', function() { conn.end(); }); - conn.on('close', function() { - common.error('client connection close'); - }); }); var buffer = ''; |