Skip to content

Commit 0b376cb

Browse files
TrottMyles Borins
authored andcommitted
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: #6012 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent 840c094 commit 0b376cb

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

test/pummel/test-crypto-dh.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
2-
var common = require('../common');
3-
var assert = require('assert');
2+
const common = require('../common');
3+
const assert = require('assert');
44

55
try {
66
var crypto = require('crypto');

test/pummel/test-dtrace-jsstack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if (os.type() != 'SunOS') {
1414
var frames = [ 'stalloogle', 'bagnoogle', 'doogle' ];
1515

1616
var stalloogle = function(str) {
17-
expected = str;
17+
global.expected = str;
1818
os.loadavg();
1919
};
2020

test/pummel/test-net-throttle.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
'use strict';
2-
var common = require('../common');
3-
var assert = require('assert');
4-
var net = require('net');
2+
const common = require('../common');
3+
const assert = require('assert');
4+
const net = require('net');
55

6-
var N = 1024 * 1024;
7-
var part_N = N / 3;
6+
const N = 1024 * 1024;
7+
const part_N = N / 3;
88
var chars_recved = 0;
99
var npauses = 0;
1010

1111
console.log('build big string');
12-
body = 'C'.repeat(N);
12+
const body = 'C'.repeat(N);
1313

1414
console.log('start server on port ' + common.PORT);
1515

0 commit comments

Comments
 (0)