1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
From: Simon McVittie <smcv@debian.org>
Date: Fri, 19 Sep 2025 13:09:22 +0100
Subject: gio/tests: Convert the time to wait for expected signal into a
constant
No functional change.
Signed-off-by: Simon McVittie <smcv@debian.org>
Applied-upstream: 2.86.1, commit:b8f88557ab86625368b28de09c5a1ae944be7177
---
gio/tests/gdbus-connection-slow.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gio/tests/gdbus-connection-slow.c b/gio/tests/gdbus-connection-slow.c
index 55e8b35..ec71f90 100644
--- a/gio/tests/gdbus-connection-slow.c
+++ b/gio/tests/gdbus-connection-slow.c
@@ -28,6 +28,8 @@
#include "gdbus-tests.h"
+#define WAIT_FOR_FLUSH_MSEC 1000
+
/* all tests rely on a shared mainloop */
static GMainLoop *loop = NULL;
@@ -49,7 +51,7 @@ static gboolean
test_connection_flush_on_timeout (gpointer user_data)
{
guint iteration = GPOINTER_TO_UINT (user_data);
- g_printerr ("Timeout waiting 1000 msec on iteration %d\n", iteration);
+ g_printerr ("Timeout waiting %d msec on iteration %d\n", WAIT_FOR_FLUSH_MSEC, iteration);
g_assert_not_reached ();
return G_SOURCE_REMOVE;
}
@@ -118,7 +120,7 @@ test_connection_flush (void)
g_assert_no_error (error);
g_assert_true (ret);
- timeout_mainloop_id = g_timeout_add (1000, test_connection_flush_on_timeout, GUINT_TO_POINTER (n));
+ timeout_mainloop_id = g_timeout_add (WAIT_FOR_FLUSH_MSEC, test_connection_flush_on_timeout, GUINT_TO_POINTER (n));
g_main_loop_run (loop);
g_source_remove (timeout_mainloop_id);
}
|