This repository has been archived by the owner on Mar 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2330: Close all handles during Jest teardown r=bonomat a=luckysori _Waiting for comit-network/comit-js-sdk#176 to be merged and for those changes to be included in a release of `comit-js-sdk` before we can update the last commit in this PR to use that release instead of a local dependency created via [`yalc`](https://github.com/whitecolor/yalc) (which seems to work **much** better than `yarn link`)._ Fixes #2211. 1. Turns out Jest will hang until every timeout is cleared, so racing against a timeout that is only cleared after it resolves was not good. 2. The proper teardown of the e2e test environment is fully achieved with 3698f3a, after a lot of debugging. Unfortunately, Jest recommends this ``` Consider running Jest with `--detectOpenHandles` to troubleshoot this issue ``` when tests hang after passing, but it just [doesn't seem to do anything](jestjs/jest#9473). I tried using [`leaked-handles`](https://github.com/Raynos/leaked-handles) without success, but finally found [`wtfnode`](https://github.com/myndzi/wtfnode), which identified `bcoin` as the culprit. --- My OCD was definitely triggered with this one, as a different error got me to investigate how to get rid of `smack-my-jasmine-up`. Turns out removing it did not fix that other error, but I still see it as a win, since depending on such an obscure library is bad. --- And another bug squashed! No more ``` MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added to [process]. Use emitter.setMaxListeners() to increase limit ``` errors, by combining cde8e0c and 127a4a2: - shutting down the logger during teardown. - closing log files after 5 seconds of inactivity, to prevent us from reaching the limit of listeners. I believe log files can be reopened if something else needs to be logged. Co-authored-by: Lucas Soriano del Pino <l.soriano.del.pino@gmail.com>
- Loading branch information
Showing
15 changed files
with
84 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,3 +61,5 @@ TAGS | |
# Blockchain nodes artifacts | ||
blockchain_nodes/bitcoin/ | ||
blockchain_nodes/parity/parity | ||
.yalc | ||
yalc.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
jasmine.getEnv().addReporter({ | ||
specStarted: (result) => | ||
// @ts-ignore | ||
(jasmine.currentTestName = result.description), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters