From: Timo Sirainen Date: Thu, 2 Sep 2021 11:31:36 +0000 (+0300) Subject: lib-http: test-http-client-errors - Fix random hangs X-Git-Tag: 2.3.17~160 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a476e16ae32b5689b0059e0ae79c705f352371b1;p=thirdparty%2Fdovecot%2Fcore.git lib-http: test-http-client-errors - Fix random hangs Wait for subprocesses to be initialized before starting each test. This should fix random hangs with the test. --- diff --git a/src/lib-http/test-http-client-errors.c b/src/lib-http/test-http-client-errors.c index 7e6921809d..f8efd402e7 100644 --- a/src/lib-http/test-http-client-errors.c +++ b/src/lib-http/test-http-client-errors.c @@ -3780,6 +3780,7 @@ static int test_run_server(struct test_server_data *data) if (debug) i_debug("PID=%s", my_pid); + test_subprocess_notify_signal_send_parent(SIGHUP); ioloop = io_loop_create(); data->server_test(data->index); io_loop_destroy(&ioloop); @@ -3862,6 +3863,8 @@ test_run_client_server(const struct http_client_settings *client_set, fd_listen = fds[i]; test_subprocess_fork(test_run_server, &data, FALSE); i_close_fd(&fd_listen); + test_subprocess_notify_signal_wait(SIGHUP, 10000); + test_subprocess_notify_signal_reset(SIGHUP); } }