Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Network Errors should not hang #13

Description

@JasonGore

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions