From 165f61ee20a3e9f6a95a77da92db76cc7b4427e1 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Fri, 7 Jul 2017 18:01:26 +0200 Subject: [PATCH] fix tests --- tests/auto/jsonrpc/testjsonrpc.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/auto/jsonrpc/testjsonrpc.cpp b/tests/auto/jsonrpc/testjsonrpc.cpp index 194c4194..a9ee5fd9 100644 --- a/tests/auto/jsonrpc/testjsonrpc.cpp +++ b/tests/auto/jsonrpc/testjsonrpc.cpp @@ -506,10 +506,8 @@ void TestJSONRPC::stateChangeEmitsNotifications() QNetworkRequest request(QUrl(QString("http://localhost:%1/setstate?%2=%3").arg(m_mockDevice1Port).arg(stateTypeId.toString()).arg(QString::number(newVal)))); QNetworkReply *reply = nam.get(request); connect(reply, SIGNAL(finished()), reply, SLOT(deleteLater())); - - qDebug() << "Waiting for notifications"; - - QVERIFY(clientSpy.wait()); + QSignalSpy replySpy(reply, SIGNAL(finished())); + replySpy.wait(); // Make sure the notification contains all the stuff we expect QVariantList stateChangedVariants = checkNotifications(clientSpy, "Devices.StateChanged"); @@ -608,9 +606,6 @@ void TestJSONRPC::pluginConfigChangeEmitsNotification() response = injectAndWait("Devices.SetPluginConfiguration", params); - qDebug() << "Waiting for notifications"; - QVERIFY(clientSpy.wait()); - QVariantList notificationData = checkNotifications(clientSpy, "Devices.PluginConfigurationChanged"); QCOMPARE(notificationData.first().toMap().value("notification").toString() == "Devices.PluginConfigurationChanged", true); }