flamegrill
flamegrill copied to clipboard
Network Errors should not hang
Various network errors result in flamegrill hanging forever:
-
net::ERR_CONNECTION_TIMED_OUT
-
net::ERR_NAME_NOT_RESOLVED
-
net::ERR_CONNECTION_REFUSED
Flamegrill should abort or continue when these errors occur. Add unit tests for their occurrence, as well.
Example:
C:\git\temp\temp
λ flamegrill -n Test -s http://invalid.url
options: {"command":"cook","name":"Test","scenario":"http://invalid.url"}
profile logFile: C:\git\temp\temp\puppeteer.log
Starting test for Test at http://invalid.url
(node:30912) UnhandledPromiseRejectionWarning: Error: net::ERR_NAME_NOT_RESOLVED at http://invalid.url
at navigate (C:\git\flamegrill\node_modules\puppeteer\lib\FrameManager.js:121:37)
at process._tickCallback (internal/process/next_tick.js:68:7)
-- ASYNC --
at Frame.<anonymous> (C:\git\flamegrill\node_modules\puppeteer\lib\helper.js:111:15)
at Page.goto (C:\git\flamegrill\node_modules\puppeteer\lib\Page.js:674:49)
at Page.<anonymous> (C:\git\flamegrill\node_modules\puppeteer\lib\helper.js:112:23)
at C:\git\flamegrill\packages\flamegrill\lib\profile\profile.js:94:20
at Generator.next (<anonymous>)
at fulfilled (C:\git\flamegrill\packages\flamegrill\lib\profile\profile.js:4:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:30912) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:30912) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Terminate batch job (Y/N)?
^C