mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
kwalletd: add timeouts to tests
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
face85bda5
commit
b8ebb65378
2 changed files with 3 additions and 1 deletions
|
@ -23,6 +23,7 @@
|
|||
#include <sys/socket.h>
|
||||
|
||||
#include <QTest>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QFile>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QEventLoop>
|
||||
|
@ -182,6 +183,7 @@ void KWalletExecuter::execute()
|
|||
if (!QDBusConnection::sessionBus().interface()->isServiceRegistered("org.kde.kwalletd")) {
|
||||
qDebug() << "AAAAAAAA";
|
||||
QEventLoop loop;
|
||||
QTimer::singleShot(30000, &loop, SLOT(quit()));
|
||||
QDBusServiceWatcher *watcher = new QDBusServiceWatcher("org.kde.kwalletd",
|
||||
QDBusConnection::sessionBus(),
|
||||
QDBusServiceWatcher::WatchForRegistration);
|
||||
|
|
|
@ -43,7 +43,7 @@ int main(int argc, char *argv[]) \
|
|||
KGlobal::ref(); /* don't quit qeventloop after closing a mainwindow */ \
|
||||
int result = QTest::qExec( &tc, argc, argv ); \
|
||||
dbus.start("kill", QStringList() << "-9" << pid); \
|
||||
dbus.waitForFinished(); \
|
||||
dbus.waitForFinished(10000); \
|
||||
return result; \
|
||||
}
|
||||
#endif //KWALLET_CUSTOM_QTEST
|
||||
|
|
Loading…
Add table
Reference in a new issue