Skip to content
Snippets Groups Projects
Commit 3a9e4594 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Relax client manager test


We can actually get several TCP connection attempts from the client
manager. That is the whole point of retrying. The QQmlDebugServer
explicitly allows sequential connections, so we should allow them, too.

Change-Id: Id38290dbfd86fadfb0c648189f89827330ea1174
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@qt.io>
parent e67cb6d5
No related branches found
No related tags found
No related merge requests found
...@@ -183,7 +183,7 @@ void QmlProfilerClientManagerTest::testUnresponsiveTcp() ...@@ -183,7 +183,7 @@ void QmlProfilerClientManagerTest::testUnresponsiveTcp()
clientManager.setTcpConnection(hostName, port); clientManager.setTcpConnection(hostName, port);
clientManager.connectToTcpServer(); clientManager.connectToTcpServer();
QTRY_COMPARE(connectionSpy.count(), 1); QTRY_VERIFY(connectionSpy.count() > 0);
QTRY_COMPARE(failedSpy.count(), 1); QTRY_COMPARE(failedSpy.count(), 1);
QCOMPARE(openedSpy.count(), 0); QCOMPARE(openedSpy.count(), 0);
QCOMPARE(closedSpy.count(), 0); QCOMPARE(closedSpy.count(), 0);
...@@ -271,7 +271,6 @@ void QmlProfilerClientManagerTest::testResponsiveTcp() ...@@ -271,7 +271,6 @@ void QmlProfilerClientManagerTest::testResponsiveTcp()
QTcpServer server; QTcpServer server;
QScopedPointer<QTcpSocket> socket; QScopedPointer<QTcpSocket> socket;
connect(&server, &QTcpServer::newConnection, [&server, &socket]() { connect(&server, &QTcpServer::newConnection, [&server, &socket]() {
QVERIFY(socket.isNull());
socket.reset(server.nextPendingConnection()); socket.reset(server.nextPendingConnection());
fakeDebugServer(socket.data()); fakeDebugServer(socket.data());
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment