diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-06-04 13:03:31 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-06-05 10:11:51 (GMT) |
commit | 95ceabf52d79b922a87f7c023c9606e633ab1ea2 (patch) | |
tree | 8c610628ae695efb7c07a69fa80e0142eb0d0b23 | |
parent | 6fff92a31c4acd270d0ecb4cda336ba098801ffb (diff) | |
download | Qt-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
-rw-r--r-- | tests/auto/_networkselftest/tst_networkselftest.cpp | 6 |
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); |