summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-06-04 13:03:31 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-06-05 10:11:51 (GMT)
commit95ceabf52d79b922a87f7c023c9606e633ab1ea2 (patch)
tree8c610628ae695efb7c07a69fa80e0142eb0d0b23 /tests
parent6fff92a31c4acd270d0ecb4cda336ba098801ffb (diff)
downloadQt-95ceabf52d79b922a87f7c023c9606e633ab1ea2.zip
Qt-95ceabf52d79b922a87f7c023c9606e633ab1ea2.tar.gz
Qt-95ceabf52d79b922a87f7c023c9606e633ab1ea2.tar.bz2
Autotest: Fixed a race condition in the network self test.
Some of the tests (including the httpsServer one) requested that the server close the connection (Connection: close). It could happen that, well, the server did close the connection and we noticed it while doing the waitForBytesWritten in the doSocketFlush function. Then we'd create an error in the next step because the socket wasn't connected. Reviewed-by: TrustMe
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/_networkselftest/tst_networkselftest.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/tests/auto/_networkselftest/tst_networkselftest.cpp b/tests/auto/_networkselftest/tst_networkselftest.cpp
index 0fa001a..eac603f 100644
--- a/tests/auto/_networkselftest/tst_networkselftest.cpp
+++ b/tests/auto/_networkselftest/tst_networkselftest.cpp
@@ -190,12 +190,6 @@ static void netChat(int port, const QList<Chat> &chat)
// now start the chat
QList<Chat>::ConstIterator it = chat.constBegin();
for (int i = 1; it != chat.constEnd(); ++it, ++i) {
- if (it->type != Chat::Reconnect
- && socket.state() != QAbstractSocket::ConnectedState
- && socket.state() != QAbstractSocket::ClosingState)
- QFAIL(QString("Internal error: socket is in invalid state %1 in step %2")
- .arg(socket.state()).arg(i).toLocal8Bit());
-
switch (it->type) {
case Chat::Expect: {
qDebug() << i << "Expecting" << prettyByteArray(it->data);