summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/arthur/common/baselineprotocol.cpp10
-rw-r--r--tests/arthur/common/baselineprotocol.h2
-rw-r--r--tests/auto/lancelot/tst_lancelot.cpp3
3 files changed, 9 insertions, 6 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 {
diff --git a/tests/auto/lancelot/tst_lancelot.cpp b/tests/auto/lancelot/tst_lancelot.cpp
index 9721665..2eb3f20 100644
--- a/tests/auto/lancelot/tst_lancelot.cpp
+++ b/tests/auto/lancelot/tst_lancelot.cpp
@@ -254,7 +254,8 @@ void tst_Lancelot::runTestSuite(GraphicsEngine engine, QImage::Format format)
if (baseline.status == ImageItem::BaselineNotFound) {
- proto.submitNewBaseline(rendered, 0);
+ if (!proto.submitNewBaseline(rendered, 0))
+ QWARN("Failed to submit new baseline: " + proto.errorMessage().toLatin1());
QSKIP("Baseline not found; new baseline created.", SkipSingle);
}