]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
global: unit-tests - Extract TEST_SIGNALS_DEFAULT_TIMEOUT_MS constant
authorMarco Bettini <marco.bettini@open-xchange.com>
Thu, 19 Jan 2023 13:13:04 +0000 (13:13 +0000)
committerMarco Bettini <marco.bettini@open-xchange.com>
Thu, 19 Jan 2023 14:13:40 +0000 (14:13 +0000)
src/lib-http/test-http-client-errors.c
src/lib-test/test-subprocess.h

index ed42326dea61a88ff502d1c2154b8990a1ed5491..7bb44e23e6cd5bb83d5c61466e6a238361a49620 100644 (file)
@@ -424,7 +424,8 @@ test_client_connection_refused(const struct http_client_settings *client_set)
        struct _connection_refused *ctx;
 
        /* wait for the server side to close the socket */
-       test_subprocess_notify_signal_wait(SIGUSR1, 10000);
+       test_subprocess_notify_signal_wait(
+               SIGUSR1, TEST_SIGNALS_DEFAULT_TIMEOUT_MS);
 
        ctx = i_new(struct _connection_refused, 1);
        ctx->count = 2;
@@ -3870,7 +3871,8 @@ test_run_client_server(const struct http_client_settings *client_set,
                        fd_listen = fds[i];
                        test_subprocess_notify_signal_reset(SIGHUP);
                        test_subprocess_fork(test_run_server, &data, FALSE);
-                       test_subprocess_notify_signal_wait(SIGHUP, 10000);
+                       test_subprocess_notify_signal_wait(
+                               SIGHUP, TEST_SIGNALS_DEFAULT_TIMEOUT_MS);
                        i_close_fd(&fd_listen);
                }
        }
@@ -3888,7 +3890,8 @@ test_run_client_server(const struct http_client_settings *client_set,
                fd_listen = fd;
                test_subprocess_notify_signal_reset(SIGHUP);
                test_subprocess_fork(test_run_dns, dns_test, FALSE);
-               test_subprocess_notify_signal_wait(SIGHUP, 10000);
+               test_subprocess_notify_signal_wait(
+                       SIGHUP, TEST_SIGNALS_DEFAULT_TIMEOUT_MS);
                i_close_fd(&fd_listen);
        }
 
index 1a8d174db28971d92a5864e6aa8648715b8003ab..598b735299f3dd8e320ad14ecfb037b86825fa8d 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef TEST_SUBPROCESS_H
 #define TEST_SUBPROCESS_H
 
+#define TEST_SIGNALS_DEFAULT_TIMEOUT_MS 10000
+
 struct test_subprocess;
 
 /* Fork a sub-process for this test. The func is the main function for the