qt5base-lts/tests/auto/dbus/qdbusconnection
Thiago Macieira f8b5142e30 Fix race condition in tst_QDBusConnection::pendingCallWhenDisconnected
The test sent a message and hoped that the "delete server" would cause
the server object in the QDBusConnectionManager thread be deleted before
it could receive and process the message. That's racy, because on some
CI machines, it did and then sent back an error reply indicating the
object sought was not found.

Instead, let's use a child process that we can kill to make it exit at
the right time.

I've chosen to use dbus-daemon itself, because that lets us test the
actual conditions that triggered the original bug: the daemon getting
killed during a desktop session shutdown on Linux.

Change-Id: I87e17314d8b24ae983b1fffd1454483aea87c921
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2016-06-06 11:39:53 +00:00
..
.gitignore Moved dbus autotests into new directory structure 2011-09-01 09:37:08 +02:00
qdbusconnection.pro And move the creation of connections to the thread 2015-09-15 02:08:45 +00:00
tst_qdbusconnection.cpp Fix race condition in tst_QDBusConnection::pendingCallWhenDisconnected 2016-06-06 11:39:53 +00:00
tst_qdbusconnection.h Add an autotest for the QtDBus message spy hook 2016-05-09 05:31:11 +00:00