[Pkg-javascript-devel] Bug#849971: node-sprintf-js: FTBFS randomly (AssertionError)

Santiago Vila sanvila at debian.org
Mon Jan 2 19:05:34 UTC 2017


Package: src:node-sprintf-js
Version: 1.0.3-1
Severity: serious

Dear maintainer:

I tried to build this package in stretch with "dpkg-buildpackage -A"
but it failed:

--------------------------------------------------------------------------------
[...]
 debian/rules build-indep
dh build-indep
   dh_testdir -i
   dh_update_autotools_config -i
   dh_auto_configure -i
   debian/rules override_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
if [ ! -d debian/build ]; then \
    mkdir debian/build; \
fi; \
for _FILE in src/*.js ; \
do \
    cp ${_FILE} debian/build/; \
    uglifyjs  -o debian/build/$(basename ${_FILE} .js).min.js ${_FILE}; \
done
dh_auto_build
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   debian/rules override_dh_auto_test
make[1]: Entering directory '/<<PKGBUILDDIR>>'
mocha test/test.js

  ․․․

  2 passing (11ms)
  1 failing

  1) sprintfjs should return formated strings for callbacks:
     AssertionError: 1482551006652 == '1482551006653'
      at Context.<anonymous> (/<<PKGBUILDDIR>>/test/test.js:80:16)
      at callFn (/usr/lib/nodejs/mocha/lib/runnable.js:223:21)
      at Test.Runnable.run (/usr/lib/nodejs/mocha/lib/runnable.js:216:7)
      at Runner.runTest (/usr/lib/nodejs/mocha/lib/runner.js:373:10)
      at /usr/lib/nodejs/mocha/lib/runner.js:451:12
      at next (/usr/lib/nodejs/mocha/lib/runner.js:298:14)
      at /usr/lib/nodejs/mocha/lib/runner.js:308:7
      at next (/usr/lib/nodejs/mocha/lib/runner.js:246:23)
      at Immediate._onImmediate (/usr/lib/nodejs/mocha/lib/runner.js:275:5)
      at processImmediate [as _immediateCallback] (timers.js:383:17)



debian/rules:31: recipe for target 'override_dh_auto_test' failed
make[1]: *** [override_dh_auto_test] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
debian/rules:14: recipe for target 'build-indep' failed
make: *** [build-indep] Error 2
dpkg-buildpackage: error: debian/rules build-indep gave error exit status 2
--------------------------------------------------------------------------------

This is the assertion which fails:

1482551006652 == '1482551006653'

The number is clearly the number of seconds after the epoch, i.e. "date +%s"
and the test clearly takes the current time at different times and expects
those timestamps to be the same. This is a race condition and should be disabled,
because tests are supposed to be always successful.

If you want "a way to reproduce it", just build it over and over again
until it fails (it will).

Thanks.



More information about the Pkg-javascript-devel mailing list