Re: [PATCH v2 09/14] simple-ipc: add t/helper/test-simple-ipc and t0052
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Feb 2, 2021, 21:35 UTC
- Message-ID
- <20210202213523.GD2091@szeder.dev>
- In-Reply-To
- <f0bebf1cdb31f94cb111df100b3bcb5e2d93a91e.1612208747.git.gitgitgadget@gmail.com>
On Mon, Feb 01, 2021 at 07:45:42PM +0000, Jeff Hostetler via GitGitGadget wrote:
Show 30 quoted lines
> diff --git a/t/t0052-simple-ipc.sh b/t/t0052-simple-ipc.sh
> new file mode 100755
> index 00000000000..69588354545
> --- /dev/null
> +++ b/t/t0052-simple-ipc.sh
> @@ -0,0 +1,129 @@
> +#!/bin/sh
> +
> +test_description='simple command server'
> +
> +. ./test-lib.sh
> +
> +test-tool simple-ipc SUPPORTS_SIMPLE_IPC || {
> + skip_all='simple IPC not supported on this platform'
> + test_done
> +}
> +
> +stop_simple_IPC_server () {
> + test -n "$SIMPLE_IPC_PID" || return 0
> +
> + kill "$SIMPLE_IPC_PID" &&
> + SIMPLE_IPC_PID=
> +}
> +
> +test_expect_success 'start simple command server' '
> + { test-tool simple-ipc daemon --threads=8 & } &&
> + SIMPLE_IPC_PID=$! &&
> + test_atexit stop_simple_IPC_server &&
> +
> + sleep 1 &&This will certainly lead to occasional failures when the daemon takes longer than that mere 1 second delay under heavy load or in CI jobs.
> + > + test-tool simple-ipc is-active > +'