Skip to content

Commit 9ad611c

Browse files
Trotttargos
authored andcommitted
test: fix flaky test-crypto-timing-safe-dqual-benchmarks
Fixes: #38226 PR-URL: #38476 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Ruy Adorno <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 13de4cf commit 9ad611c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/internal/bootstrap/node.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ const {
4646
ObjectGetPrototypeOf,
4747
ObjectPreventExtensions,
4848
ObjectSetPrototypeOf,
49-
Proxy,
5049
ReflectGet,
5150
ReflectSet,
5251
SymbolToStringTag,
@@ -108,8 +107,10 @@ const deprecationHandler = {
108107

109108
get(target, key, receiver) {
110109
const val = ReflectGet(target, key, receiver);
111-
if (val != null && typeof val === 'object')
110+
if (val != null && typeof val === 'object') {
111+
// eslint-disable-next-line node-core/prefer-primordials
112112
return new Proxy(val, deprecationHandler);
113+
}
113114
return val;
114115
},
115116

@@ -119,6 +120,7 @@ const deprecationHandler = {
119120
}
120121
};
121122

123+
// eslint-disable-next-line node-core/prefer-primordials
122124
let processConfig = new Proxy(
123125
JSONParse(nativeModule.config),
124126
deprecationHandler);

test/pummel/test-crypto-timing-safe-equal-benchmarks.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ assert(
111111
`timingSafeEqual should not leak information from its execution time (t=${t})`
112112
);
113113

114-
// As a sanity check to make sure the statistical tests are working, run the
114+
// As a coherence check to make sure the statistical tests are working, run the
115115
// same benchmarks again, this time with an unsafe comparison function. In this
116116
// case the t-value should be above the threshold.
117117
const unsafeCompare = (bufA, bufB) => bufA.equals(bufB);

0 commit comments

Comments
 (0)