mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 10:52:51 +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 <sys/socket.h>
|
||||||
|
|
||||||
#include <QTest>
|
#include <QTest>
|
||||||
|
#include <QtCore/QTimer>
|
||||||
#include <QtCore/QFile>
|
#include <QtCore/QFile>
|
||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
#include <QtCore/QEventLoop>
|
#include <QtCore/QEventLoop>
|
||||||
|
@ -182,6 +183,7 @@ void KWalletExecuter::execute()
|
||||||
if (!QDBusConnection::sessionBus().interface()->isServiceRegistered("org.kde.kwalletd")) {
|
if (!QDBusConnection::sessionBus().interface()->isServiceRegistered("org.kde.kwalletd")) {
|
||||||
qDebug() << "AAAAAAAA";
|
qDebug() << "AAAAAAAA";
|
||||||
QEventLoop loop;
|
QEventLoop loop;
|
||||||
|
QTimer::singleShot(30000, &loop, SLOT(quit()));
|
||||||
QDBusServiceWatcher *watcher = new QDBusServiceWatcher("org.kde.kwalletd",
|
QDBusServiceWatcher *watcher = new QDBusServiceWatcher("org.kde.kwalletd",
|
||||||
QDBusConnection::sessionBus(),
|
QDBusConnection::sessionBus(),
|
||||||
QDBusServiceWatcher::WatchForRegistration);
|
QDBusServiceWatcher::WatchForRegistration);
|
||||||
|
|
|
@ -43,7 +43,7 @@ int main(int argc, char *argv[]) \
|
||||||
KGlobal::ref(); /* don't quit qeventloop after closing a mainwindow */ \
|
KGlobal::ref(); /* don't quit qeventloop after closing a mainwindow */ \
|
||||||
int result = QTest::qExec( &tc, argc, argv ); \
|
int result = QTest::qExec( &tc, argc, argv ); \
|
||||||
dbus.start("kill", QStringList() << "-9" << pid); \
|
dbus.start("kill", QStringList() << "-9" << pid); \
|
||||||
dbus.waitForFinished(); \
|
dbus.waitForFinished(10000); \
|
||||||
return result; \
|
return result; \
|
||||||
}
|
}
|
||||||
#endif //KWALLET_CUSTOM_QTEST
|
#endif //KWALLET_CUSTOM_QTEST
|
||||||
|
|
Loading…
Add table
Reference in a new issue