tests: Make an error check less specific in gsocketclient-slow

On Linux the error will be `G_IO_ERROR_CONNECTION_REFUSED`, but on macOS
it will be `G_IO_ERROR_TIMED_OUT`. Both errors seem reasonable to me, so
let’s not specifically require one of them.

See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4104#note_2161451

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2024-07-09 17:36:28 +01:00
parent de71e95041
commit 8d0bf4ed39
No known key found for this signature in database
GPG Key ID: DCDF5885B1F3ED73

View File

@ -231,7 +231,8 @@ test_connection_failed (void)
g_main_context_iteration (NULL, TRUE); g_main_context_iteration (NULL, TRUE);
conn = g_socket_client_connect_to_uri_finish (client, async_result, &local_error); conn = g_socket_client_connect_to_uri_finish (client, async_result, &local_error);
g_assert_error (local_error, G_IO_ERROR, G_IO_ERROR_CONNECTION_REFUSED); g_assert_nonnull (local_error);
g_assert_cmpint (local_error->domain, ==, G_IO_ERROR);
g_assert_null (conn); g_assert_null (conn);
g_clear_error (&local_error); g_clear_error (&local_error);
g_clear_object (&async_result); g_clear_object (&async_result);