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

Commit

Permalink
Browse files Browse the repository at this point in the history
test: suppress simple/test-dgram-pingpong chatter
  • Loading branch information
bnoordhuis committed Jul 26, 2012
1 parent 2cfd3f4 commit 799d7f6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/simple/test-dgram-pingpong.js
Expand Up @@ -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) {
Expand All @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit 799d7f6

Please sign in to comment.