From a8faea725d8567de5dc72257a0647b89eece51ea Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Sun, 2 Dec 2018 16:51:47 +0100 Subject: [PATCH] wait longer for DBus in tests While running under valgrind, it may take over 30 cycles in the loop to wait for a running GTestDBus instance. So we have to increase the waiting time. Waiting a whole second will change the signal/noise ratio and will only fail, if there's really a problem with the GTestDBus usage. And as we're sleeping 500us in every loop, we usually get a super fast response, too. --- test/dbus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/dbus.c b/test/dbus.c index a650b29..934f839 100644 --- a/test/dbus.c +++ b/test/dbus.c @@ -130,11 +130,11 @@ TEST test_dbus_init(void) { owner_id = dbus_init(); uint waiting = 0; - while (!dbus_conn && waiting < 20) { + while (!dbus_conn && waiting < 2000) { usleep(500); waiting++; } - ASSERTm("After 10ms, there is still no dbus connection available.", + ASSERTm("After 1s, there is still no dbus connection available.", dbus_conn); PASS(); }