tst_socketnotifier: Fix timeout of QTcpServer::waitForNewConnection()

The timeout defaults to 0, give it 5s.

Pick-to: 6.0
Change-Id: I975810a1ecee8bb8b3a3f143f1379a9a09589a40
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
bb10
Friedemann Kleint 2021-01-20 07:51:11 +01:00
parent f0ccdbb439
commit ad84332f2b
1 changed files with 2 additions and 2 deletions

View File

@ -193,7 +193,7 @@ void tst_QSocketNotifier::unexpectedDisconnection()
readEnd1.connectToHost(server.serverAddress(), server.serverPort());
QVERIFY(readEnd1.waitForWrite());
QCOMPARE(readEnd1.state(), QAbstractSocket::ConnectedState);
QVERIFY(server.waitForNewConnection());
QVERIFY(server.waitForNewConnection(5000));
QTcpSocket *writeEnd1 = server.nextPendingConnection();
QVERIFY(writeEnd1 != 0);
@ -202,7 +202,7 @@ void tst_QSocketNotifier::unexpectedDisconnection()
readEnd2.connectToHost(server.serverAddress(), server.serverPort());
QVERIFY(readEnd2.waitForWrite());
QCOMPARE(readEnd2.state(), QAbstractSocket::ConnectedState);
QVERIFY(server.waitForNewConnection());
QVERIFY(server.waitForNewConnection(5000));
QTcpSocket *writeEnd2 = server.nextPendingConnection();
QVERIFY(writeEnd2 != 0);