test(windows): multi-process test for IPC (#3310)

I tested this by temporarily putting panics in `test_ipc_manager` and
`test_ipc_worker`.
It looks like, if a process crashes, Windows will clean up its named
pipe, and the process waiting on the other side of the named pipe will
get an error.
This is good but it's not air-tight - ~~We could still have a situation
where a worker process locks up, and the main process crashes, and the
worker process then leaks.~~ #3311 will fix that

For that case I'll try this
https://stackoverflow.com/questions/53208/how-do-i-automatically-destroy-child-processes-in-windows

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
This commit is contained in:
Reactor Scram
2024-01-22 15:48:28 -06:00
committed by GitHub
parent 7ded78e78c
commit 215883caec
3 changed files with 289 additions and 142 deletions

View File

@@ -90,6 +90,14 @@ jobs:
run: |
pnpm install -g @tauri-apps/cli
# Set logs to debug
$env:RUST_LOG = "debug"
# I'm running the multi-process test here because I don't think it can be
# embedded in a test binary. It requires the client to call subcommands
# from its own exe.
cargo run -p firezone-windows-client -- debug test-ipc
# PNPM installs tauri-cli to somewhere in $PATH
tauri build