From e645dd72df3e7b8083a1969ac3fdef111eb3123d Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Mon, 2 Nov 2020 12:51:36 +0100 Subject: 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 --- tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests') 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() -- cgit v1.2.3