From e76e21389bf57cb5731867f5e87056e4406c922f Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 2 Mar 2016 11:37:52 -0500 Subject: [PATCH] test: reduce timeout in tcp_close_while_connecting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Somtimes (once every 10 runs or so) the socket would 'connect' before 'uv_close' was called. This caused EHOSTUNREACH to be set for SO_ERROR instead of ECANCELED. PR-URL: https://github.com/libuv/libuv/pull/744 Reviewed-By: Saúl Ibarra Corretgé --- test/test-tcp-close-while-connecting.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-tcp-close-while-connecting.c b/test/test-tcp-close-while-connecting.c index 2c39b652..60df7a57 100644 --- a/test/test-tcp-close-while-connecting.c +++ b/test/test-tcp-close-while-connecting.c @@ -72,7 +72,7 @@ TEST_IMPL(tcp_close_while_connecting) { RETURN_SKIP("Network unreachable."); ASSERT(r == 0); ASSERT(0 == uv_timer_init(loop, &timer1_handle)); - ASSERT(0 == uv_timer_start(&timer1_handle, timer1_cb, 50, 0)); + ASSERT(0 == uv_timer_start(&timer1_handle, timer1_cb, 1, 0)); ASSERT(0 == uv_timer_init(loop, &timer2_handle)); ASSERT(0 == uv_timer_start(&timer2_handle, timer2_cb, 86400 * 1000, 0)); ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT));