]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: test-http-client-errors - Reset USR1 notification signal between tests
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 30 Sep 2021 13:32:24 +0000 (15:32 +0200)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 30 Sep 2021 13:32:24 +0000 (15:32 +0200)
The "connection refused" test already set the signal as being received,
which caused the "connection refused backoff" test to randomly fail since it
thought the signal was immediately received.

src/lib-http/test-http-client-errors.c

index 4436af371b700f1b66d2b67781c30c1473250210..a5670bae43e4d50b6fd3b16f2a1c81599903620f 100644 (file)
@@ -457,6 +457,7 @@ static void test_connection_refused(void)
        test_client_defaults(&http_client_set);
 
        test_begin("connection refused");
+       test_subprocess_notify_signal_reset(SIGUSR1);
        test_run_client_server(&http_client_set,
                               test_client_connection_refused,
                               test_server_connection_refused, 1, NULL);
@@ -465,6 +466,7 @@ static void test_connection_refused(void)
        http_client_set.max_connect_attempts = 4;
 
        test_begin("connection refused backoff");
+       test_subprocess_notify_signal_reset(SIGUSR1);
        test_run_client_server(&http_client_set,
                               test_client_connection_refused,
                               test_server_connection_refused, 1, NULL);