[glib: 1/2] tests: Speed up the GIO actions test
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] tests: Speed up the GIO actions test
- Date: Mon, 24 Feb 2020 13:16:44 +0000 (UTC)
commit c8d479d8b211c79a5555bdc3495dbf5a7a5e94e1
Author: Philip Withnall <withnall endlessm com>
Date: Wed Dec 18 16:51:11 2019 +0000
tests: Speed up the GIO actions test
Reduce the number of iterations of things sent over a mock session bus
from different threads, to avoid the test spending quite so long
contested over the `gsignal.c` lock.
The test now takes about 10 seconds, according to `time`, rather than
around 100 or longer.
Signed-off-by: Philip Withnall <withnall endlessm com>
gio/tests/actions.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/tests/actions.c b/gio/tests/actions.c
index 3d438fc5d..c183c7aa1 100644
--- a/gio/tests/actions.c
+++ b/gio/tests/actions.c
@@ -890,7 +890,7 @@ do_export (gpointer data)
bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
path = g_strdup_printf("/%p", data);
- for (i = 0; i < 100000; i++)
+ for (i = 0; i < 10000; i++)
{
id = g_dbus_connection_export_action_group (bus, path, G_ACTION_GROUP (group), &error);
g_assert_no_error (error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]