[glib] GDBus: bump timeout for some tests



commit 71b1d738e2c0fe900b6bb6672aa464ce74b489b3
Author: David Zeuthen <davidz redhat com>
Date:   Thu Sep 23 16:09:25 2010 -0400

    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>

 gio/tests/gdbus-connection.c |    8 ++++----
 gio/tests/gdbus-tests.c      |    8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gio/tests/gdbus-connection.c b/gio/tests/gdbus-connection.c
index 97d4fc9..e74474d 100644
--- a/gio/tests/gdbus-connection.c
+++ b/gio/tests/gdbus-connection.c
@@ -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);
diff --git a/gio/tests/gdbus-tests.c b/gio/tests/gdbus-tests.c
index fa40930..06f1384 100644
--- a/gio/tests/gdbus-tests.c
+++ b/gio/tests/gdbus-tests.c
@@ -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);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]