summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2012-07-09 17:57:40 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2012-07-26 23:55:29 +0200
commit105c6ec8d596be2b7cc95339923ca38ea614f54e (patch)
treeaeb90fd68ad176a42995a15f0c529c5c68af8aa9 /test
parent332fea5ac1816e498030109c4211bca24a7fa667 (diff)
downloadnode-new-105c6ec8d596be2b7cc95339923ca38ea614f54e.tar.gz
test: suppress simple/test-dgram-pingpong chatter
Diffstat (limited to 'test')
-rw-r--r--test/simple/test-dgram-pingpong.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/simple/test-dgram-pingpong.js b/test/simple/test-dgram-pingpong.js
index 18b39b5aa6..0353cd7274 100644
--- a/test/simple/test-dgram-pingpong.js
+++ b/test/simple/test-dgram-pingpong.js
@@ -27,6 +27,7 @@ var assert = require('assert');
var Buffer = require('buffer').Buffer;
var dgram = require('dgram');
+var debug = false;
var tests_run = 0;
function pingPongTest(port, host) {
@@ -36,8 +37,8 @@ function pingPongTest(port, host) {
var sent_final_ping = false;
var server = dgram.createSocket('udp4', function(msg, rinfo) {
- console.log('server got: ' + msg +
- ' from ' + rinfo.address + ':' + rinfo.port);
+ if (debug) console.log('server got: ' + msg +
+ ' from ' + rinfo.address + ':' + rinfo.port);
if (/PING/.exec(msg)) {
var buf = new Buffer(4);
@@ -61,8 +62,8 @@ function pingPongTest(port, host) {
client = dgram.createSocket('udp4');
client.on('message', function(msg, rinfo) {
- console.log('client got: ' + msg +
- ' from ' + rinfo.address + ':' + rinfo.port);
+ if (debug) console.log('client got: ' + msg +
+ ' from ' + rinfo.address + ':' + rinfo.port);
assert.equal('PONG', msg.toString('ascii'));
count += 1;