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
This commit is contained in:
Bastien Nocera 2019-11-21 10:59:03 +01:00
parent 8555aeec8d
commit 3894335dc6
2 changed files with 12 additions and 0 deletions

View File

@ -188,6 +188,12 @@ test_cancel_multiple_concurrent (void)
GCancellable *cancellable; GCancellable *cancellable;
guint i, iterations; guint i, iterations;
if (!g_test_thorough ())
{
g_test_skip ("Not running timing heavy test");
return;
}
cancellable = g_cancellable_new (); cancellable = g_cancellable_new ();
loop = g_main_loop_new (NULL, FALSE); loop = g_main_loop_new (NULL, FALSE);

View File

@ -1130,6 +1130,12 @@ test_timed_wait (void)
gint64 start_time; gint64 start_time;
gint poll_duration; 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); data = create_server (G_SOCKET_FAMILY_IPV4, echo_server_thread, FALSE, &error);
if (error != NULL) if (error != NULL)
{ {