geli
geli copied to clipboard
🐛 BUG: Non-deterministic DownloadController unit test failure
An apparent unit test bug manifested itself here in a Travis CI run:
1) DownloadFile
POST /api/download/pdf/individual
should pass:
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/travis/build/geli-lms/geli/api/build/test/integration/download.js)
Re-running the tests (tested once locally and once in Travis CI) didn't reproduce this failure, so apparently this unit test bug is non-deterministic. Because of this it may be necessary to manually audit the unit test(s) and/or controller route code to find the problem.
Acceptance criteria:
- [ ] Find the cause of this issue.
(Also check whether it might affect other
DownloadController
unit tests / routes.) - [ ] Fix it.
Additional info:
This might be a duplicate of #913?