From 0b376cb3f944f1ef44d6bcd7531d4a19a624f6e8 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 1 Apr 2016 21:40:21 -0700 Subject: [PATCH] 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 Reviewed-By: Ben Noordhuis --- test/pummel/test-crypto-dh.js | 4 ++-- test/pummel/test-dtrace-jsstack.js | 2 +- test/pummel/test-net-throttle.js | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/pummel/test-crypto-dh.js b/test/pummel/test-crypto-dh.js index 596d107a287a28..d4e1c493b7266d 100644 --- a/test/pummel/test-crypto-dh.js +++ b/test/pummel/test-crypto-dh.js @@ -1,6 +1,6 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); +const common = require('../common'); +const assert = require('assert'); try { var crypto = require('crypto'); diff --git a/test/pummel/test-dtrace-jsstack.js b/test/pummel/test-dtrace-jsstack.js index 2e5c8670553138..f53c950baa32e9 100644 --- a/test/pummel/test-dtrace-jsstack.js +++ b/test/pummel/test-dtrace-jsstack.js @@ -14,7 +14,7 @@ if (os.type() != 'SunOS') { var frames = [ 'stalloogle', 'bagnoogle', 'doogle' ]; var stalloogle = function(str) { - expected = str; + global.expected = str; os.loadavg(); }; diff --git a/test/pummel/test-net-throttle.js b/test/pummel/test-net-throttle.js index e98a6c765a905e..d2f32ec25b6ff2 100644 --- a/test/pummel/test-net-throttle.js +++ b/test/pummel/test-net-throttle.js @@ -1,15 +1,15 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var net = require('net'); +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); -var N = 1024 * 1024; -var part_N = N / 3; +const N = 1024 * 1024; +const part_N = N / 3; var chars_recved = 0; var npauses = 0; console.log('build big string'); -body = 'C'.repeat(N); +const body = 'C'.repeat(N); console.log('start server on port ' + common.PORT);