From 2f92658d3da7350787985c82a38cbcaf491f5415 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Mon, 17 Sep 2018 14:37:30 +0200 Subject: tests: Fix wait for 2nd signal Change-Id: Ifa1afe59a87195d93dfeb5446c3ca9d635e558d3 Reviewed-by: Alex Blasche --- tests/auto/qopcuaclient/tst_client.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/auto/qopcuaclient/tst_client.cpp b/tests/auto/qopcuaclient/tst_client.cpp index 8910fdb..b340f52 100644 --- a/tests/auto/qopcuaclient/tst_client.cpp +++ b/tests/auto/qopcuaclient/tst_client.cpp @@ -618,9 +618,7 @@ void Tst_QOpcUaClient::connectInvalidPassword() QSignalSpy connectSpy(opcuaClient, &QOpcUaClient::stateChanged); opcuaClient->connectToEndpoint(url); - connectSpy.wait(); - - QCOMPARE(connectSpy.count(), 2); + QTRY_VERIFY_WITH_TIMEOUT(connectSpy.count() == 2, 3000); QCOMPARE(connectSpy.at(0).at(0), QOpcUaClient::Connecting); QCOMPARE(connectSpy.at(1).at(0), QOpcUaClient::Disconnected); -- cgit v1.2.3