-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
986: LauncherSpec: Check that all launched processes do exit r=KtorZ a=rvl Relates to #703. # Overview It appears that the `jormungandr` node backend process was not getting cleaned up on Windows and that actions which are supposed to run concurrently with the backend were not running. These extra tests check that the [`withCreateProcess`](http://hackage.haskell.org/package/process-1.6.6.0/docs/System-Process.html#v:withCreateProcess) function takes care of terminating the process -- if it is given a chance (i.e. if the process is not killed with -9, or "End Task" on Windows). It also checks that the concurrent actions run while the backend process is running, and that the backend process is terminated when the other action completes. Finally, it implements a workaround for the unwanted behaviour of the `process` library on Windows where `waitForProcess` seems to block all concurrent async actions in the thread. - [x] Adds a test to `cardano-wallet-launcher:test:unit` for process clean up. - [x] Adjusts commands used so that the tests can be run under Wine. - [x] Adds an assertion to check that the process is killed if the action does not complete. - [x] Adds an assertion to check that the the process is killed promptly if the action completes. - [x] Fixes async blocking issue on Windows. ### Testing under Wine Use something like this: ``` wine $(nix-build release.nix -A x86_64-pc-mingw32.tests.cardano-wallet-launcher.unit.x86_64-linux -o launcher-unit-windows)/cardano-wallet-launcher-2019.11.7/unit.exe --match "Backend process" ``` Co-authored-by: Rodney Lorrimar <[email protected]>
- Loading branch information
Showing
5 changed files
with
247 additions
and
64 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
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
Oops, something went wrong.