Skip to content

Commit

Permalink
extend the shutdown wait time
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera committed Nov 12, 2024
1 parent 658463a commit d0dddda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions tests/socket_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ static int s_test_socket_ex(
}
ASSERT_SUCCESS(aws_socket_connect(&outgoing, endpoint, event_loop, s_local_outgoing_connection, &outgoing_args));

if (listener.options.type == AWS_SOCKET_STREAM || aws_event_loop_get_default_type() == AWS_EVENT_LOOP_DISPATCH_QUEUE) {
if (listener.options.type == AWS_SOCKET_STREAM ||
aws_event_loop_get_default_type() == AWS_EVENT_LOOP_DISPATCH_QUEUE) {
ASSERT_SUCCESS(aws_mutex_lock(&mutex));
ASSERT_SUCCESS(
aws_condition_variable_wait_pred(&condition_variable, &mutex, s_incoming_predicate, &listener_args));
Expand Down Expand Up @@ -486,7 +487,8 @@ static int s_test_socket_udp_dispatch_queue(
ASSERT_SUCCESS(aws_mutex_unlock(&mutex));
ASSERT_INT_EQUALS(AWS_OP_SUCCESS, io_args.error_code);

if (listener.options.type == AWS_SOCKET_STREAM || aws_event_loop_get_default_type() == AWS_EVENT_LOOP_DISPATCH_QUEUE) {
if (listener.options.type == AWS_SOCKET_STREAM ||
aws_event_loop_get_default_type() == AWS_EVENT_LOOP_DISPATCH_QUEUE) {
ASSERT_SUCCESS(aws_mutex_lock(&mutex));
ASSERT_SUCCESS(
aws_condition_variable_wait_pred(&condition_variable, &mutex, s_incoming_predicate, &listener_args));
Expand Down Expand Up @@ -1049,7 +1051,7 @@ static int s_test_outgoing_local_sock_errors(struct aws_allocator *allocator, vo

int socket_connect_result = aws_socket_connect(&outgoing, &endpoint, event_loop, s_null_sock_connection, &args);
// As Apple network framework has a async API design, we would not get the error back on connect
if(aws_event_loop_get_default_type() != AWS_EVENT_LOOP_DISPATCH_QUEUE){
if (aws_event_loop_get_default_type() != AWS_EVENT_LOOP_DISPATCH_QUEUE) {
ASSERT_FAILS(socket_connect_result);
ASSERT_TRUE(
aws_last_error() == AWS_IO_SOCKET_CONNECTION_REFUSED || aws_last_error() == AWS_ERROR_FILE_INVALID_PATH);
Expand Down
2 changes: 1 addition & 1 deletion tests/tls_handler_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ static int s_tls_channel_shutdown_with_cache_test_helper(struct aws_allocator *a
ASSERT_SUCCESS(s_tls_channel_server_client_tester_cleanup());

// wait for socket ref count drop and released
aws_thread_current_sleep(1000000000);
aws_thread_current_sleep(3000000000);

return AWS_OP_SUCCESS;
}
Expand Down

0 comments on commit d0dddda

Please sign in to comment.