mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-04 10:16:17 +01:00
GDBus: bump timeout for some tests
When under load, a one second timeout is just not enough. This can be observed by e.g. restarting a CPU- and IO-intensive application like a web browser with many tabs while running the test cases. Therefore, bump the timeouts to 30 seconds. Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
parent
1f6a9f1e2d
commit
71b1d738e2
@ -205,7 +205,7 @@ test_connection_life_cycle (void)
|
||||
/* ok, finalize the connection and check that all the GDestroyNotify functions are invoked as expected */
|
||||
g_object_unref (c2);
|
||||
quit_mainloop_fired = FALSE;
|
||||
quit_mainloop_id = g_timeout_add (1000, test_connection_quit_mainloop, &quit_mainloop_fired);
|
||||
quit_mainloop_id = g_timeout_add (30000, test_connection_quit_mainloop, &quit_mainloop_fired);
|
||||
while (TRUE)
|
||||
{
|
||||
if (on_signal_registration_freed_called &&
|
||||
@ -654,7 +654,7 @@ test_connection_signals (void)
|
||||
gboolean quit_mainloop_fired;
|
||||
guint quit_mainloop_id;
|
||||
quit_mainloop_fired = FALSE;
|
||||
quit_mainloop_id = g_timeout_add (5000, test_connection_quit_mainloop, &quit_mainloop_fired);
|
||||
quit_mainloop_id = g_timeout_add (30000, test_connection_quit_mainloop, &quit_mainloop_fired);
|
||||
while (count_name_owner_changed < 2 && !quit_mainloop_fired)
|
||||
g_main_loop_run (loop);
|
||||
g_source_remove (quit_mainloop_id);
|
||||
@ -787,7 +787,7 @@ test_connection_filter_name_owner_changed_signal_handler (GDBusConnection *conn
|
||||
static gboolean
|
||||
test_connection_filter_on_timeout (gpointer user_data)
|
||||
{
|
||||
g_printerr ("Timeout waiting 1000 msec on service\n");
|
||||
g_printerr ("Timeout waiting 30 sec on service\n");
|
||||
g_assert_not_reached ();
|
||||
return FALSE;
|
||||
}
|
||||
@ -890,7 +890,7 @@ test_connection_filter (void)
|
||||
NULL,
|
||||
NULL);
|
||||
g_assert_cmpint (signal_handler_id, !=, 0);
|
||||
timeout_mainloop_id = g_timeout_add (1000, test_connection_filter_on_timeout, NULL);
|
||||
timeout_mainloop_id = g_timeout_add (30000, test_connection_filter_on_timeout, NULL);
|
||||
g_main_loop_run (loop);
|
||||
g_source_remove (timeout_mainloop_id);
|
||||
g_dbus_connection_signal_unsubscribe (c, signal_handler_id);
|
||||
|
@ -68,7 +68,7 @@ _g_assert_property_notify_run (gpointer object,
|
||||
G_CALLBACK (on_property_notify),
|
||||
&data);
|
||||
g_free (s);
|
||||
timeout_id = g_timeout_add (5 * 1000,
|
||||
timeout_id = g_timeout_add (30 * 1000,
|
||||
on_property_notify_timeout,
|
||||
&data);
|
||||
g_main_loop_run (data.loop);
|
||||
@ -117,7 +117,7 @@ _g_assert_signal_received_run (gpointer object,
|
||||
signal_name,
|
||||
G_CALLBACK (on_signal_received),
|
||||
&data);
|
||||
timeout_id = g_timeout_add (5 * 1000,
|
||||
timeout_id = g_timeout_add (30 * 1000,
|
||||
on_signal_received_timeout,
|
||||
&data);
|
||||
g_main_loop_run (data.loop);
|
||||
@ -176,7 +176,7 @@ _g_object_wait_for_single_ref_do (gpointer object)
|
||||
if (G_OBJECT (object)->ref_count == 1)
|
||||
goto out;
|
||||
|
||||
if (num_ms_elapsed > 5000)
|
||||
if (num_ms_elapsed > 30000)
|
||||
{
|
||||
timed_out = TRUE;
|
||||
goto out;
|
||||
@ -228,7 +228,7 @@ _g_object_wait_for_single_ref_do (gpointer object)
|
||||
goto out;
|
||||
|
||||
data.loop = g_main_loop_new (NULL, FALSE);
|
||||
timeout_id = g_timeout_add (5 * 1000,
|
||||
timeout_id = g_timeout_add (30 * 1000,
|
||||
on_wait_single_ref_timeout,
|
||||
&data);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user