Re: [PATCH v2 09/14] simple-ipc: add t/helper/test-simple-ipc and t0052
- From
Jeff King <peff@peff.net>
- Date
- Feb 3, 2021, 04:36 UTC
- Message-ID
- <YBooReQcjsi41VsA@coredump.intra.peff.net>
- In-Reply-To
- <20210202213523.GD2091@szeder.dev>
On Tue, Feb 02, 2021 at 10:35:23PM +0100, SZEDER Gábor wrote:
Show 9 quoted lines
> > +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.Yeah. The robust thing is to have the server indicate when it's ready to receive requests. There's some prior art in t/lib-git-daemon.sh using a fifo to get a line to the caller. It's ugly, but AFAIK pretty bulletproof.
-Peff