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:31:41 +0000 |
commit | 6b2407e2d7b9e86c0380bec48456612af15810bd (patch) | |
tree | 9b2daed58c35ff03eb77927dcca82d832a575fb7 | |
parent | 53d42c95414252d0f68d9c79dbc5f5fa7ba59272 (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 aaf1564140..c5d502f660 100644 --- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp +++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp @@ -858,7 +858,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); |