tst_socketnotifier: Fix timeout of QTcpServer::waitForNewConnection()
The timeout defaults to 0, give it 5s. Change-Id: I975810a1ecee8bb8b3a3f143f1379a9a09589a40 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> (cherry picked from commit ad84332f2bbe10601ba4c21fd6d4a446d16ed94c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
f83f4badce
commit
f2eb4b14af
@ -147,7 +147,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);
|
||||
|
||||
@ -156,7 +156,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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user