summaryrefslogtreecommitdiff
path: root/test/pummel/test-crypto-timing-safe-equal-benchmarks.js
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2016-10-22 16:27:13 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2016-10-24 22:44:45 +0200
commitd1f7c965bb7eb541e345bf4079a5a168ee4f206a (patch)
tree4da8213445563c4e0b75259a79457371505d5b56 /test/pummel/test-crypto-timing-safe-equal-benchmarks.js
parent1b8fca16bca4053351f693244da2246ab9a6fb82 (diff)
downloadandroid-node-v8-d1f7c965bb7eb541e345bf4079a5a168ee4f206a.tar.gz
android-node-v8-d1f7c965bb7eb541e345bf4079a5a168ee4f206a.tar.bz2
android-node-v8-d1f7c965bb7eb541e345bf4079a5a168ee4f206a.zip
test: make flaky pummel test more reliable
Increase the number of iterations from 1e4 to 1e5. Makes the test pass for me locally when previously it would fail 9 out of 10 times because the running time was not enough to smooth away the outliers. Fixes: https://github.com/nodejs/node/issues/8744 PR-URL: https://github.com/nodejs/node/pull/9241 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: not-an-aardvark <not-an-aardvark@users.noreply.github.com>
Diffstat (limited to 'test/pummel/test-crypto-timing-safe-equal-benchmarks.js')
-rw-r--r--test/pummel/test-crypto-timing-safe-equal-benchmarks.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/pummel/test-crypto-timing-safe-equal-benchmarks.js b/test/pummel/test-crypto-timing-safe-equal-benchmarks.js
index de46a899f2..5560a4a256 100644
--- a/test/pummel/test-crypto-timing-safe-equal-benchmarks.js
+++ b/test/pummel/test-crypto-timing-safe-equal-benchmarks.js
@@ -28,7 +28,7 @@ function runOneBenchmark(...args) {
}
function getTValue(compareFunc) {
- const numTrials = 10000;
+ const numTrials = 1e5;
const bufSize = 10000;
// Perform benchmarks to verify that timingSafeEqual is actually timing-safe.