From 7647777f32a7742b2c27dbee01a4b28a4881c1bd Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 22 Oct 2016 16:27:13 +0200 Subject: [PATCH] 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 Reviewed-By: James M Snell Reviewed-By: not-an-aardvark --- test/pummel/test-crypto-timing-safe-equal-benchmarks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pummel/test-crypto-timing-safe-equal-benchmarks.js b/test/pummel/test-crypto-timing-safe-equal-benchmarks.js index de46a899f263f5..5560a4a256b5fe 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.