npm_lazy
npm_lazy copied to clipboard
Resource test for blocking breaks intermittently on Travis
This test intermittently seems to break on Travis, on both 0.8 and 0.10 of node: https://github.com/mixu/npm_lazy/blob/ad5acbbd4160e9bc44a85302f91ace13e9219719/test/resource.test.js#L486
I've updated the tests file to give the error output in the assert failures so we can see a bit better what's going on.
Failure example: https://travis-ci.org/CL0SeY/npm_lazy/jobs/43973760#L599
1) resource tests tar resource with granular control when the resource is already fetching, block all pending requests:
Uncaught
AssertionError: Error: URL is not in the npm_lazy cache, and it cannot be fetched (max retries exhausted): http://registry.npmjs.org/remote-valid2
at onDone (/home/travis/build/CL0SeY/npm_lazy/test/resource.test.js:486:18)
...
Same code, working example: https://travis-ci.org/CL0SeY/npm_lazy/builds/43973879
Looks like it might be a timing related issue - not sure if it's a problem with the tests or the blocking yet.