Skip to content

Commit eb15c8d

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 d4abca5 commit eb15c8d

3 files changed

Lines changed: 11 additions & 12 deletions

File tree

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
'use strict';
2-
varcommon=require('../common');
3-
varassert=require('assert');
2+
constcommon=require('../common');
3+
constassert=require('assert');
4+
constcrypto=require('crypto');
45

5-
try{
6-
varcrypto=require('crypto');
7-
}catch(e){
6+
if(!common.hasCrypto){
87
console.log('1..0 # Skipped: node compiled without OpenSSL.');
98
return;
109
}

‎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
varframes=['stalloogle','bagnoogle','doogle'];
1515

1616
varstalloogle=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-
varcommon=require('../common');
3-
varassert=require('assert');
4-
varnet=require('net');
2+
constcommon=require('../common');
3+
constassert=require('assert');
4+
constnet=require('net');
55

6-
varN=1024*1024;
7-
varpart_N=N/3;
6+
constN=1024*1024;
7+
constpart_N=N/3;
88
varchars_recved=0;
99
varnpauses=0;
1010

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

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

0 commit comments

Comments
 (0)