Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(integtests): make installing NPM7 safe against concurrent calls (…
…aws#12642) Do this by memoizing the Promise of the async call; each call gets the same promise. This is fine because it is safe to await a Promise multiple times. Effectively the function will only get invoked once and each caller waits for the one copy to finish. We lose "debugging" output here, where it would write the progress bar of NPM to the output log of the first test to install NPM7. I did not think maintaining that was worth breaking the clear contract of the memoize implementation (0 arguments clearly implies that there is no argument-value based cache here). (Failure to install will still bubble up as an exception including the shell output) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information