From 2daac34a28aa8a1623f6d347e2a81474b65caf8a Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 29 May 2018 21:01:27 +0200 Subject: Cleanup --- tests/resourcecommunicationtest.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/resourcecommunicationtest.cpp b/tests/resourcecommunicationtest.cpp index 7beafc7..ca96baa 100644 --- a/tests/resourcecommunicationtest.cpp +++ b/tests/resourcecommunicationtest.cpp @@ -3,6 +3,7 @@ #include "resourceaccess.h" #include "listener.h" #include "commands.h" +#include "testutils.h" #include "handshake_generated.h" /** @@ -34,9 +35,7 @@ private slots: auto name = fbb.CreateString("test"); auto command = Sink::Commands::CreateHandshake(fbb, name); Sink::Commands::FinishHandshakeBuffer(fbb, command); - auto result = resourceAccess.sendCommand(Sink::Commands::HandshakeCommand, fbb).exec(); - result.waitForFinished(); - QVERIFY(!result.errorCode()); + VERIFYEXEC(resourceAccess.sendCommand(Sink::Commands::HandshakeCommand, fbb)); } void testCommandLoop() @@ -76,7 +75,7 @@ private slots: int complete = 0; int errors = 0; for (int i = 0; i < count; i++) { - resourceAccess.sendCommand(Sink::Commands::PingCommand) + VERIFYEXEC(resourceAccess.sendCommand(Sink::Commands::PingCommand) .then([&resourceAccess, &errors, &complete](const KAsync::Error &error) { complete++; if (error) { @@ -85,9 +84,7 @@ private slots: } resourceAccess.close(); resourceAccess.open(); - }) - .exec() - .waitForFinished(); + })); } QTRY_COMPARE(complete, count); QVERIFY(!errors); -- cgit v1.2.3