[Pkg-javascript-devel] Bug#898755: node-miller-rabin: FTBFS and flaky autopkgtests

Graham Inggs ginggs at debian.org
Tue May 15 17:38:30 BST 2018


Source: node-miller-rabin
Version: 4.0.1-1
Severity: serious
Tags: patch
User: debian-ci at lists.debian.org
Usertags: flaky

Hi Maintainer

Since 2017-12-28, node-miller-rabin has FTBFS in unstable [1] with the 
following error:

   0 passing (2s)
   1 failing

   1) Miller-Rabin
        should test number for primality:
      Error: Timeout of 2000ms exceeded. For async tests and hooks, 
ensure "done()" is called; if returning a Promise, ensure it resolves.
       at done (/usr/lib/nodejs/mocha/lib/runnable.js:298:13)
       at callFn (/usr/lib/nodejs/mocha/lib/runnable.js:372:7)
       at Test.Runnable.run (/usr/lib/nodejs/mocha/lib/runnable.js:346:7)
       at Runner.runTest (/usr/lib/nodejs/mocha/lib/runner.js:442:10)
       at /usr/lib/nodejs/mocha/lib/runner.js:560:12
       at next (/usr/lib/nodejs/mocha/lib/runner.js:356:14)
       at /usr/lib/nodejs/mocha/lib/runner.js:366:7
       at next (/usr/lib/nodejs/mocha/lib/runner.js:290:14)
       at Immediate.<anonymous> (/usr/lib/nodejs/mocha/lib/runner.js:334:5)

The same test is run during autopkgtests and often fails, especially on 
the slower architectures which are tested in Ubuntu, but not in Debian.

I believe this is another example of the unreliable timing in tests 
being discussed in #853035.

I was able to work around the problem in Ubuntu by increasing the test 
timeout to 8000ms (4000ms was not sufficient on armhf) as per the patch 
below:

--- a/test/api-test.js
+++ b/test/api-test.js
@@ -4,6 +4,7 @@

  describe('Miller-Rabin', function() {
    it('should test number for primality', function() {
+    this.timeout(8000);
      assert(!mr.test(new bn(221)));
      assert(mr.test(new bn(257)));

Regards
Graham


[1] 
https://tests.reproducible-builds.org/debian/history/amd64/node-miller-rabin.html



More information about the Pkg-javascript-devel mailing list