From: Artem Boldariev Date: Thu, 26 Oct 2023 22:43:00 +0000 (+0300) Subject: Increase conn. timeout in the timeout recovery tests X-Git-Tag: v9.19.19~10^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c9d526d84da88554b54e903481898c77e47cf7f1;p=thirdparty%2Fbind9.git Increase conn. timeout in the timeout recovery tests Due to increased number of the NM unit tests and, thus, increased load on the system timeout recovery tests can sometimes fail, in particular on FreeBSD. This commit fixes that. Besides, it seems that use of T_SOFT here was unintentional to begin with. --- diff --git a/tests/isc/doh_test.c b/tests/isc/doh_test.c index eb393d5412b..ad083f1e700 100644 --- a/tests/isc/doh_test.c +++ b/tests/isc/doh_test.c @@ -109,7 +109,8 @@ static atomic_bool use_PROXY_over_TLS = false; static isc_nm_t **nm = NULL; /* Timeout for soft-timeout tests (0.05 seconds) */ -#define T_SOFT 50 +#define T_SOFT 50 +#define T_CONNECT 30 * 1000 #define NSENDS 100 #define NWRITES 10 @@ -697,7 +698,8 @@ doh_timeout_recovery(void *arg ISC_ATTR_UNUSED) { ISC_NM_HTTP_DEFAULT_PATH); isc_nm_httpconnect(connect_nm, NULL, &tcp_listen_addr, req_url, atomic_load(&POST), timeout_request_cb, NULL, ctx, - client_sess_cache, T_SOFT, get_proxy_type(), NULL); + client_sess_cache, T_CONNECT, get_proxy_type(), + NULL); } static int @@ -771,7 +773,7 @@ doh_connect_thread(void *arg) { */ int_fast64_t active = atomic_fetch_add(&active_cconnects, 1); if (active > workers) { - goto next; + return; } connect_send_request(connect_nm, req_url, atomic_load(&POST), &(isc_region_t){ .base = (uint8_t *)send_msg.base, @@ -782,8 +784,6 @@ doh_connect_thread(void *arg) { if (sends <= 0) { isc_loopmgr_shutdown(loopmgr); } - -next: {} } static void diff --git a/tests/isc/netmgr_common.c b/tests/isc/netmgr_common.c index e5d685f4fe8..e11d7f83300 100644 --- a/tests/isc/netmgr_common.c +++ b/tests/isc/netmgr_common.c @@ -978,7 +978,7 @@ stream_timeout_recovery(void **state ISC_ATTR_UNUSED) { */ isc_nm_settimeouts(connect_nm, T_SOFT, T_SOFT, T_SOFT, T_SOFT); connect_readcb = timeout_retry_cb; - stream_connect(connect_connect_cb, NULL, T_SOFT); + stream_connect(connect_connect_cb, NULL, T_CONNECT); } int