From 3894335dc6e57812eb72dcc4ed57c7d3b0bc30f9 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 21 Nov 2019 10:59:03 +0100 Subject: [PATCH] tests: Don't "timeout tests" by default Those tests seem to regularly fail because a timeout (which we're measuring outside the function that times out) is too long, which can happen when the system is busy. Don't run those tests unless "thorough" tests are requested. This disables those tests by default. Bail out! GLib-GIO:ERROR:../gio/tests/socket.c:1167:test_timed_wait: assertion failed (poll_duration < 112000): (114254 < 112000) Bail out! GLib-GIO:ERROR:../gio/tests/cancellable.c:167:on_mock_operation_ready: assertion failed (error == (g-io-error-quark, 19)): error is NULL --- gio/tests/cancellable.c | 6 ++++++ gio/tests/socket.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/gio/tests/cancellable.c b/gio/tests/cancellable.c index 044628228..cd349a8f3 100644 --- a/gio/tests/cancellable.c +++ b/gio/tests/cancellable.c @@ -188,6 +188,12 @@ test_cancel_multiple_concurrent (void) GCancellable *cancellable; guint i, iterations; + if (!g_test_thorough ()) + { + g_test_skip ("Not running timing heavy test"); + return; + } + cancellable = g_cancellable_new (); loop = g_main_loop_new (NULL, FALSE); diff --git a/gio/tests/socket.c b/gio/tests/socket.c index eeebddd62..f1651972f 100644 --- a/gio/tests/socket.c +++ b/gio/tests/socket.c @@ -1130,6 +1130,12 @@ test_timed_wait (void) gint64 start_time; gint poll_duration; + if (!g_test_thorough ()) + { + g_test_skip ("Not running timing heavy test"); + return; + } + data = create_server (G_SOCKET_FAMILY_IPV4, echo_server_thread, FALSE, &error); if (error != NULL) {