Skip to content
This repository was archived by the owner on Jan 19, 2021. It is now read-only.
This repository was archived by the owner on Jan 19, 2021. It is now read-only.

UnhandledPromiseRejectionWarning in completeQueueHandler #264

@cschwebk

Description

@cschwebk

In the completeQueueHandler method of src/test_runner.js, an Unhandled Promise Rejection will be triggered if a reporter (such as magellan-xunit-reporter) does not return a promise out of the flush method. I suspect it will also be triggered if flush does not exist in the reporter. It looks like these checks were removed in #257.

(node:41618) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'then' of undefined
    at innerResolve (.../node_modules/testarmada-magellan/src/test_runner.js:196:21)
    at new Promise (<anonymous>)
    at Promise.all._.map.listener (.../node_modules/testarmada-magellan/src/test_runner.js:193:15)
    at arrayMap (.../node_modules/lodash/lodash.js:639:23)
    at Function.map (.../node_modules/lodash/lodash.js:9556:14)
    at Timeout.setTimeout [as _onTimeout] (.../node_modules/testarmada-magellan/src/test_runner.js:190:13)
    at ontimeout (timers.js:438:13)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
(node:41618) 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: 2)
(node:41618) [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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions