]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use T_CONNECT timeout constant for TCP tests (instead of 1 ms)
authorArtem Boldariev <artem@boldariev.com>
Wed, 7 Apr 2021 13:11:40 +0000 (16:11 +0300)
committerOndřej Surý <ondrej@sury.org>
Wed, 7 Apr 2021 13:37:10 +0000 (15:37 +0200)
The netmgr_test would be failing on heavily loaded systems because the
connection timeout was set to 1 ms.  Use the global constant instead.

lib/isc/tests/netmgr_test.c

index 0d363d5774e1d026fc0834270d241ab6d8987095..7193be2cc5f09c305e62d2cf4e38793a2ca1dea1 100644 (file)
@@ -1057,7 +1057,7 @@ static void
 tcp_connect(isc_nm_t *nm) {
        isc_nm_tcpconnect(nm, (isc_nmiface_t *)&tcp_connect_addr,
                          (isc_nmiface_t *)&tcp_listen_addr, connect_connect_cb,
-                         NULL, 1, 0);
+                         NULL, T_CONNECT, 0);
 }
 
 static void
@@ -1077,7 +1077,7 @@ tcp_noop(void **state __attribute__((unused))) {
        isc_refcount_increment0(&active_cconnects);
        isc_nm_tcpconnect(connect_nm, (isc_nmiface_t *)&tcp_connect_addr,
                          (isc_nmiface_t *)&tcp_listen_addr, noop_connect_cb,
-                         NULL, 1, 0);
+                         NULL, T_CONNECT, 0);
        isc_nm_closedown(connect_nm);
 
        atomic_assert_int_eq(cconnects, 0);
@@ -1100,7 +1100,7 @@ tcp_noresponse(void **state __attribute__((unused))) {
        isc_refcount_increment0(&active_cconnects);
        isc_nm_tcpconnect(connect_nm, (isc_nmiface_t *)&tcp_connect_addr,
                          (isc_nmiface_t *)&tcp_listen_addr, connect_connect_cb,
-                         NULL, 1, 0);
+                         NULL, T_CONNECT, 0);
 
        WAIT_FOR_EQ(cconnects, 1);
        WAIT_FOR_EQ(csends, 1);