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.
This commit is contained in:
parent
314d982bf4
commit
a8faea725d
@ -130,11 +130,11 @@ TEST test_dbus_init(void)
|
|||||||
{
|
{
|
||||||
owner_id = dbus_init();
|
owner_id = dbus_init();
|
||||||
uint waiting = 0;
|
uint waiting = 0;
|
||||||
while (!dbus_conn && waiting < 20) {
|
while (!dbus_conn && waiting < 2000) {
|
||||||
usleep(500);
|
usleep(500);
|
||||||
waiting++;
|
waiting++;
|
||||||
}
|
}
|
||||||
ASSERTm("After 10ms, there is still no dbus connection available.",
|
ASSERTm("After 1s, there is still no dbus connection available.",
|
||||||
dbus_conn);
|
dbus_conn);
|
||||||
PASS();
|
PASS();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user