diff options
author | Andrius Bentkus <andrius.bentkus@gmail.com> | 2016-03-17 08:32:27 +0200 |
---|---|---|
committer | Saúl Ibarra Corretgé <saghul@gmail.com> | 2016-04-21 20:28:33 +0200 |
commit | 5c6c2681824ef825040fafa54157544696b8ef4c (patch) | |
tree | befb1c0a6995848c20b2cbda5e663fcb7bfca1b0 /test/test-tcp-write-queue-order.c | |
parent | 6f17a617da4065552e899578c73f516255d83dfb (diff) | |
download | libuv-5c6c2681824ef825040fafa54157544696b8ef4c.tar.gz libuv-5c6c2681824ef825040fafa54157544696b8ef4c.zip |
test: set a big send buffer size for tcp_write_queue_order
We set the maximum buffer size of the client socket to a specific
value so unreasonable OS settings won't trigger assert failures.
Fixes: https://github.com/libuv/libuv/issues/764
Refs: https://github.com/libuv/libuv/pull/767
PR-URL: https://github.com/libuv/libuv/pull/768
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Diffstat (limited to 'test/test-tcp-write-queue-order.c')
-rw-r--r-- | test/test-tcp-write-queue-order.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test-tcp-write-queue-order.c b/test/test-tcp-write-queue-order.c index aa4d2acc..8a98ab83 100644 --- a/test/test-tcp-write-queue-order.c +++ b/test/test-tcp-write-queue-order.c @@ -107,6 +107,7 @@ static void start_server(void) { TEST_IMPL(tcp_write_queue_order) { uv_connect_t connect_req; struct sockaddr_in addr; + int buffer_size = 16 * 1024; start_server(); @@ -117,6 +118,7 @@ TEST_IMPL(tcp_write_queue_order) { &client, (struct sockaddr*) &addr, 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)); |