summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@theqtcompany.com>2016-05-18 16:09:25 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2016-05-20 11:58:32 +0000
commit3da30ee8928ab27249a74966ed4981766d62ff25 (patch)
treed95ad9308368700537b05f6e58a08ca8f17342fb /tests
parent3277abece0c1c258cd2fcbdb3044b9c64b0ccfef (diff)
Fix posting delayed events in scion playlists
Instead of posting a delayed event directly we wait desired time and post an event without delay. Change-Id: Ibe4dd866c412458d361de9f3e67898aa06ec4a6c Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/scion/tst_scion.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/auto/scion/tst_scion.cpp b/tests/auto/scion/tst_scion.cpp
index 0e017c7..c2c2706 100644
--- a/tests/auto/scion/tst_scion.cpp
+++ b/tests/auto/scion/tst_scion.cpp
@@ -55,10 +55,6 @@ static QSet<QString> testFailOnParse = QSet<QString>()
static QSet<QString> testFailOnRun = QSet<QString>()
// The following test needs manual inspection of the result. However, note that we do not support multiple identical keys for event data.
- << QLatin1String("delayedSend/send1") // same as above
- << QLatin1String("delayedSend/send2") // same as above
- << QLatin1String("delayedSend/send3") // same as above
- << QLatin1String("send-data/send1") // test suite problem: we expect every stable configuration to be listed.
<< QLatin1String("w3c-ecma/test178.txml")
// We do not support the optional basic http event i/o processor.
<< QLatin1String("w3c-ecma/test201.txml")
@@ -359,11 +355,9 @@ static bool playEvent(QScxmlStateMachine *stateMachine, const QJsonObject &event
e->setOrigin(origin);
e->setOriginType(origintype);
e->setInvokeId(invokeid);
- if (eventDescription.contains(QLatin1String("after"))) {
- int delay = eventDescription.value(QLatin1String("after")).toInt();
- Q_ASSERT(delay > 0);
- e->setDelay(delay);
- }
+ if (eventDescription.contains(QLatin1String("after")))
+ QTest::qWait(eventDescription.value(QLatin1String("after")).toInt());
+
stateMachine->submitEvent(e);
if (!MySignalSpy(stateMachine, SIGNAL(reachedStableState())).fastWait()) {