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>
This commit is contained in:
Andrius Bentkus 2016-03-17 08:32:27 +02:00 committed by Saúl Ibarra Corretgé
parent 6f17a617da
commit 5c6c268182

View File

@ -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));