aboutsummaryrefslogtreecommitdiff
path: root/test/test-tcp-write-queue-order.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-tcp-write-queue-order.c')
-rw-r--r--test/test-tcp-write-queue-order.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test-tcp-write-queue-order.c b/test/test-tcp-write-queue-order.c
index d50289c3..5119be6d 100644
--- a/test/test-tcp-write-queue-order.c
+++ b/test/test-tcp-write-queue-order.c
@@ -89,6 +89,9 @@ static void connection_cb(uv_stream_t* tcp, int status) {
ASSERT(0 == uv_tcp_init(tcp->loop, &incoming));
ASSERT(0 == uv_accept(tcp, (uv_stream_t*) &incoming));
+ ASSERT(0 == uv_timer_init(uv_default_loop(), &timer));
+ ASSERT(0 == uv_timer_start(&timer, timer_cb, 1, 0));
+
connection_cb_called++;
}
@@ -120,9 +123,6 @@ TEST_IMPL(tcp_write_queue_order) {
connect_cb));
ASSERT(0 == uv_send_buffer_size((uv_handle_t*) &client, &buffer_size));
- ASSERT(0 == uv_timer_init(uv_default_loop(), &timer));
- ASSERT(0 == uv_timer_start(&timer, timer_cb, 100, 0));
-
ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT));
ASSERT(connect_cb_called == 1);