Skip to content

Commit 105c6ec

Browse files
committed
test: suppress simple/test-dgram-pingpong chatter
1 parent 332fea5 commit 105c6ec

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/simple/test-dgram-pingpong.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ var assert = require('assert');
2727
var Buffer = require('buffer').Buffer;
2828
var dgram = require('dgram');
2929

30+
var debug = false;
3031
var tests_run = 0;
3132

3233
function pingPongTest(port, host) {
@@ -36,8 +37,8 @@ function pingPongTest(port, host) {
3637
var sent_final_ping = false;
3738

3839
var server = dgram.createSocket('udp4', function(msg, rinfo) {
39-
console.log('server got: ' + msg +
40-
' from ' + rinfo.address + ':' + rinfo.port);
40+
if (debug) console.log('server got: ' + msg +
41+
' from ' + rinfo.address + ':' + rinfo.port);
4142

4243
if (/PING/.exec(msg)) {
4344
var buf = new Buffer(4);
@@ -61,8 +62,8 @@ function pingPongTest(port, host) {
6162
client = dgram.createSocket('udp4');
6263

6364
client.on('message', function(msg, rinfo) {
64-
console.log('client got: ' + msg +
65-
' from ' + rinfo.address + ':' + rinfo.port);
65+
if (debug) console.log('client got: ' + msg +
66+
' from ' + rinfo.address + ':' + rinfo.port);
6667
assert.equal('PONG', msg.toString('ascii'));
6768

6869
count += 1;

0 commit comments

Comments
 (0)