Browse Source

test: fix pummel test failures

A handful of tests in `test/pummel` were failing due to undefined
variables.

The tests in pummel are not run in CI or otherwise exercised regularly
so these failures can go unnoticed for a long time.

PR-URL: https://github.com/nodejs/node/pull/6012
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
v4.x
Rich Trott 9 years ago
committed by Myles Borins
parent
commit
0b376cb3f9
  1. 4
      test/pummel/test-crypto-dh.js
  2. 2
      test/pummel/test-dtrace-jsstack.js
  3. 12
      test/pummel/test-net-throttle.js

4
test/pummel/test-crypto-dh.js

@ -1,6 +1,6 @@
'use strict'; 'use strict';
var common = require('../common'); const common = require('../common');
var assert = require('assert'); const assert = require('assert');
try { try {
var crypto = require('crypto'); var crypto = require('crypto');

2
test/pummel/test-dtrace-jsstack.js

@ -14,7 +14,7 @@ if (os.type() != 'SunOS') {
var frames = [ 'stalloogle', 'bagnoogle', 'doogle' ]; var frames = [ 'stalloogle', 'bagnoogle', 'doogle' ];
var stalloogle = function(str) { var stalloogle = function(str) {
expected = str; global.expected = str;
os.loadavg(); os.loadavg();
}; };

12
test/pummel/test-net-throttle.js

@ -1,15 +1,15 @@
'use strict'; 'use strict';
var common = require('../common'); const common = require('../common');
var assert = require('assert'); const assert = require('assert');
var net = require('net'); const net = require('net');
var N = 1024 * 1024; const N = 1024 * 1024;
var part_N = N / 3; const part_N = N / 3;
var chars_recved = 0; var chars_recved = 0;
var npauses = 0; var npauses = 0;
console.log('build big string'); console.log('build big string');
body = 'C'.repeat(N); const body = 'C'.repeat(N);
console.log('start server on port ' + common.PORT); console.log('start server on port ' + common.PORT);

Loading…
Cancel
Save