Fix unstable test case
tst_QTcpSocket::disconnectWhileLookingUp required the host lookup + connect + disconnect procedure to complete in <50ms, which is not always true. When disconnecting (rather than aborting with close()), wait for the disconnection to complete with a timeout of 5 seconds. Task-number: QTBUG-21043 Change-Id: I3b59abf9a8eb2c6d99416e1a8ec6b528885b656e Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This commit is contained in:
parent
e8efad1b22
commit
002cb5d2c8
@ -24,5 +24,3 @@ win32 {
|
||||
} else {
|
||||
DESTDIR = ../
|
||||
}
|
||||
|
||||
CONFIG+=insignificant_test # unstable, QTBUG-21043
|
||||
|
@ -1272,6 +1272,7 @@ void tst_QTcpSocket::disconnectWhileLookingUp()
|
||||
} else {
|
||||
socket->disconnectFromHost();
|
||||
QVERIFY(socket->openMode() == QIODevice::ReadWrite);
|
||||
QVERIFY(socket->waitForDisconnected(5000));
|
||||
}
|
||||
|
||||
// let anything queued happen
|
||||
|
Loading…
Reference in New Issue
Block a user