mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
test: suppress simple/test-dgram-pingpong chatter
This commit is contained in:
1 parent
332fea5ac1
commit
105c6ec8d5
1 file changed
+5
-4
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user