Commit 3a9e4594 authored by Ulf Hermann's avatar Ulf Hermann

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: Christian Kandeler's avatarChristian Kandeler <christian.kandeler@qt.io>
parent e67cb6d5
......@@ -183,7 +183,7 @@ void QmlProfilerClientManagerTest::testUnresponsiveTcp()
clientManager.setTcpConnection(hostName, port);
clientManager.connectToTcpServer();
QTRY_COMPARE(connectionSpy.count(), 1);
QTRY_VERIFY(connectionSpy.count() > 0);
QTRY_COMPARE(failedSpy.count(), 1);
QCOMPARE(openedSpy.count(), 0);
QCOMPARE(closedSpy.count(), 0);
......@@ -271,7 +271,6 @@ void QmlProfilerClientManagerTest::testResponsiveTcp()
QTcpServer server;
QScopedPointer<QTcpSocket> socket;
connect(&server, &QTcpServer::newConnection, [&server, &socket]() {
QVERIFY(socket.isNull());
socket.reset(server.nextPendingConnection());
fakeDebugServer(socket.data());
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment