diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-11-02 12:51:36 +0100 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-11-02 15:15:41 +0100 |
commit | e645dd72df3e7b8083a1969ac3fdef111eb3123d (patch) | |
tree | 0ee4f67dd36eebf7f0f6af1bf57cbb4c962a90ba /tests | |
parent | 66c8e1f6851b35bb3f9063db377d6cbb2856a941 (diff) |
tst_qqmlbinding: Avoid event loop flakyness on Ubuntu 20.04
In a glib event loop, processEvents only processes events of the highest
priority. Apparently, some higher priority event can occur which
prevents the delayed binding from evaluating in time. Avoid the whole
issue with QTRY_VERIFY, which runs the event loop multiple times if
necessary.
Task-number: QTBUG-86187
Change-Id: I796a2db1d017d389f198a24eb73d15da91ef0a65
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp b/tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp index 2610402455..b3e6ffd79e 100644 --- a/tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp +++ b/tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp @@ -358,9 +358,8 @@ void tst_qqmlbinding::delayed() // doesn't update immediately QCOMPARE(item->property("changeCount").toInt(), 1); - QCoreApplication::processEvents(); // only updates once (non-delayed would update twice) - QCOMPARE(item->property("changeCount").toInt(), 2); + QTRY_COMPARE(item->property("changeCount").toInt(), 2); } void tst_qqmlbinding::bindingOverwriting() |