summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Keller <Rainer.Keller@qt.io>2018-09-17 14:37:30 +0200
committerRainer Keller <Rainer.Keller@qt.io>2018-09-17 13:03:47 +0000
commit2f92658d3da7350787985c82a38cbcaf491f5415 (patch)
treeee07dd7f69300a945edd922d84cf4ce9a1bf006e
parentf778074aaac5b579f7eefca30d792bb85b03af90 (diff)
tests: Fix wait for 2nd signal
Change-Id: Ifa1afe59a87195d93dfeb5446c3ca9d635e558d3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--tests/auto/qopcuaclient/tst_client.cpp4
1 files changed, 1 insertions, 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);