Skip to content

Fix uncaught async exception warnings in unit tests. Closes #95#108

Merged
shazron merged 3 commits intoadobe:masterfrom
DrewML:issue95
Feb 10, 2020
Merged

Fix uncaught async exception warnings in unit tests. Closes #95#108
shazron merged 3 commits intoadobe:masterfrom
DrewML:issue95

Conversation

@DrewML
Copy link
Copy Markdown
Contributor

@DrewML DrewML commented Feb 6, 2020

Description

I noticed #95 when working on #107. I made the minimal changes necessary to fix things up.

Related Issue

#95

Motivation and Context

No promises were being returned in the body of ActivationLogs.prototype.run, and there was no await suspending execution of the function, so the forEach would finish immediately and run would return execution before the calls to ow.activations.logs resolved.

Now we're collecting the promises and awaiting them. If any throw, the await will now cause the first error to propagate up the promise chain.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 6, 2020

Codecov Report

Merging #108 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #108   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           57        57           
  Lines         1741      1741           
  Branches       303       303           
=========================================
  Hits          1741      1741           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ceba9e...a3bf71a. Read the comment docs.

@shazron shazron merged commit 8cfcc81 into adobe:master Feb 10, 2020
bhageena pushed a commit to bhageena/aio-cli-plugin-runtime that referenced this pull request Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants