diff options
author | Pasi Petäjäjärvi <pasi.petajajarvi@qt.io> | 2022-01-20 16:38:48 +0200 |
---|---|---|
committer | Pasi Petäjäjärvi <pasi.petajajarvi@qt.io> | 2022-02-02 21:32:16 +0000 |
commit | bd8a21e752b0c6e3e006edc6e157c90e2c3a9439 (patch) | |
tree | 20e975f375ed1c3be5c5e50219126d2bc3bc54d3 | |
parent | 63f71197ca7b0a5527fb7afa6dd42885b80606b1 (diff) |
QNX: Decrease number of objects created in tst_QJSEngine::newQObjectRace
This test is so slow on QNX that it times out:
QFATAL : tst_QJSEngine::newQObjectRace() Test function timed out
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QGuiApplication(0x169b0a6b90),
parent's thread is QThread(0x37eb7070f0),
current thread is QThread(0x37eb734150)
FAIL! : tst_QJSEngine::newQObjectRace() Received a fatal error.
Task-number: QTBUG-99168
Change-Id: I623bff212b8334af60198e52bc283cc97187c3a7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 7fcc9c7f5848ac8c8264341dca7a0b5a3f0dec94)
-rw-r--r-- | tests/auto/qml/qjsengine/tst_qjsengine.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp index fb85be334e..a235dd5ad5 100644 --- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp +++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp @@ -857,7 +857,11 @@ void tst_QJSEngine::newQObjectRace() { void run() override { - for (int i=0;i<1000;++i) + int newObjectCount = 1000; +#if defined(Q_OS_QNX) + newObjectCount = 256; +#endif + for (int i=0;i<newObjectCount;++i) { QJSEngine e; auto obj = e.newQObject(new QObject); |