summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2013-12-28 17:13:13 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-08 15:04:57 +0100
commit318576f0cc0ebef78c5b27106b1a8429eb54fac8 (patch)
tree6605ee080783b632b28b8f57e3fac8230088038c
parentb86be10882236d269817c42daa1bc3fa49fe78af (diff)
downloadqtwebchannel-318576f0cc0ebef78c5b27106b1a8429eb54fac8.tar.gz
Make test_property less flaky by skipping idle messages.
These messages are somewhat unpredictable in order and as such we skip them instead of relying on their order. Change-Id: I24c082ea1afe6ede1a8058195f01ffba1e6ca8e3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r--tests/qml/tst_metaobjectpublisher.qml12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/qml/tst_metaobjectpublisher.qml b/tests/qml/tst_metaobjectpublisher.qml
index c99cb47..5e1e825 100644
--- a/tests/qml/tst_metaobjectpublisher.qml
+++ b/tests/qml/tst_metaobjectpublisher.qml
@@ -138,29 +138,25 @@ WebChannelTest {
myObj.myProperty = 1
loadUrl("property.html");
awaitInit();
- var msg = awaitMessage();
+ var msg = awaitMessageSkipIdle();
compare(msg.data.label, "init");
compare(msg.data.value, 1);
compare(myObj.myProperty, 1);
- awaitIdle();
-
// change property, should be propagated to HTML client and a message be send there
myObj.myProperty = 2;
- msg = awaitMessage();
+ msg = awaitMessageSkipIdle();
compare(msg.data.label, "changed");
compare(msg.data.value, 2);
compare(myObj.myProperty, 2);
- awaitIdle();
-
// now trigger a write from the client side
webChannel.sendMessage("setProperty", 3);
- msg = awaitMessage();
+ msg = awaitMessageSkipIdle();
compare(myObj.myProperty, 3);
// the above write is also propagated to the HTML client
- msg = awaitMessage();
+ msg = awaitMessageSkipIdle();
compare(msg.data.label, "changed");
compare(msg.data.value, 3);