Package: node-miller-rabin / 4.0.1-6

Metadata

Package Version Patches format
node-miller-rabin 4.0.1-6 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
increase timeout.patch | (download)

test/api-test.js | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 increase test timeout
fix randomly ftbfs.diff | (download)

test/api-test.js | 1 0 + 1 - 0 !
1 file changed, 1 deletion(-)

 fix ftbfs randomly
 The failure happens randomly. Sometimes it happens, sometimes it does not,
 so the only recipe to reproduce it is to try many times.
 AFAIK, this being a primality test, I assume the outcome is either
 "not prime" or "maybe prime", so the only way to test the test is by
 giving a known prime and expect "maybe prime" as output.
 .
 So: Why is the test calling mr.test with 221, which is not prime? (221 = 13 x 17)
 .
 And why this fails randomly? Does the test perform random calculations
 internally and it's therefore not deterministic? Even in such case I
 don't see how a non-prime like 221 may help to catch obvious errors in
 a test suite for a primality test.