summaryrefslogtreecommitdiffstats
path: root/tests/arthur
diff options
context:
space:
mode:
authoraavit <qt-info@nokia.com>2011-05-03 11:32:23 (GMT)
committeraavit <qt-info@nokia.com>2011-05-03 11:32:23 (GMT)
commit50be38737507f5c23b4d050e635a200024164a13 (patch)
tree50520e1e4362f167ade735613677f57063b3a6d2 /tests/arthur
parent4fe5307af44a76b99cc8c70aa330180c1985eabc (diff)
downloadQt-50be38737507f5c23b4d050e635a200024164a13.zip
Qt-50be38737507f5c23b4d050e635a200024164a13.tar.gz
Qt-50be38737507f5c23b4d050e635a200024164a13.tar.bz2
Make autotest more resilient against network timeout
Diffstat (limited to 'tests/arthur')
-rw-r--r--tests/arthur/common/baselineprotocol.cpp10
-rw-r--r--tests/arthur/common/baselineprotocol.h2
2 files changed, 7 insertions, 5 deletions
diff --git a/tests/arthur/common/baselineprotocol.cpp b/tests/arthur/common/baselineprotocol.cpp
index d5e533a..8879b78 100644
--- a/tests/arthur/common/baselineprotocol.cpp
+++ b/tests/arthur/common/baselineprotocol.cpp
@@ -424,15 +424,17 @@ bool BaselineProtocol::requestBaselineChecksums(const QString &testFunction, Ima
it->testFunction = testFunction;
QByteArray block;
- QDataStream ds(&block, QIODevice::ReadWrite);
+ QDataStream ds(&block, QIODevice::WriteOnly);
ds << *itemList;
if (!sendBlock(RequestBaselineChecksums, block))
return false;
+
Command cmd;
- if (!receiveBlock(&cmd, &block))
+ QByteArray rcvBlock;
+ if (!receiveBlock(&cmd, &rcvBlock) || cmd != BaselineProtocol::Ack)
return false;
- ds.device()->seek(0);
- ds >> *itemList;
+ QDataStream rds(&rcvBlock, QIODevice::ReadOnly);
+ rds >> *itemList;
return true;
}
diff --git a/tests/arthur/common/baselineprotocol.h b/tests/arthur/common/baselineprotocol.h
index 8a99ace..bc1a3eb 100644
--- a/tests/arthur/common/baselineprotocol.h
+++ b/tests/arthur/common/baselineprotocol.h
@@ -146,7 +146,7 @@ public:
enum Constant {
ProtocolVersion = 5,
ServerPort = 54129,
- Timeout = 5000
+ Timeout = 15000
};
enum Command {