summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-09-02 12:07:35 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-09-02 12:13:50 +0200
commitf38f75bf8310186085c3be7a9f5816115f5c74c9 (patch)
treefa2f08b0c2a8fd31f0074d83dbc49a324f9b17fe /tests
parent2d8c8ac02e8afed8d99996e3d53cacd982badfeb (diff)
Improve tests for qemu-armv7
test_runJavaScript() was badly written with a hardcoded wait of 100ms this should make it both faster on normal machines and more reliable on slower ones. Fixes: QTBUG-106210 Pick-to: 6.4 Change-Id: I539e59dce6e3719661202e1a213277794a660bd3 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/inspectorserver/tst_inspectorserver.cpp2
-rw-r--r--tests/auto/quick/qmltests/data/tst_runJavaScript.qml3
2 files changed, 2 insertions, 3 deletions
diff --git a/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp b/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp
index 0a0d3ee0f..58e8f7d11 100644
--- a/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp
+++ b/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp
@@ -136,7 +136,7 @@ void tst_InspectorServer::testRemoteDebuggingMessage()
.arg(pageList.at(0).toObject().value("webSocketDebuggerUrl").toString())
.arg(jsExpression));
- QTRY_COMPARE(webSocketQueryWebView->title(), jsExpressionResult);
+ QTRY_COMPARE_WITH_TIMEOUT(webSocketQueryWebView->title(), jsExpressionResult, 10000);
}
void tst_InspectorServer::openRemoteDebuggingSession()
diff --git a/tests/auto/quick/qmltests/data/tst_runJavaScript.qml b/tests/auto/quick/qmltests/data/tst_runJavaScript.qml
index 22e427ad4..f16cd9c41 100644
--- a/tests/auto/quick/qmltests/data/tst_runJavaScript.qml
+++ b/tests/auto/quick/qmltests/data/tst_runJavaScript.qml
@@ -34,8 +34,7 @@ TestWebEngineView {
compare(result, testTitle2);
callbackCalled = true;
});
- wait(100);
- verify(callbackCalled);
+ tryVerify(function() { return callbackCalled; });
}
}
}