Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.0, 6.6.0
-
None
-
-
3
-
8a23e3aa3 (dev), f7f5477ec (6.7)
-
Foundations Sprint 95, Foundations Sprint 96, Foundations Sprint 97, Foundations Sprint 98, Foundations Sprint 99
Description
With Qt >= 6.5.0, QTest::addRow() and QTest::newRow() check for duplicated test case tags (or more specifically, the underlying QTestTablePrivate::newData() does the check via QTesttablePrivate::hasRow()).
This was added in 2d1fd400f and ddde19129 in response to QTBUG-107185.
However, the repeated searches in dataList become prohibitively expensive with large number of generated test cases.
For example, I have a test suite that, when built with Qt 5.15.11 on linux, finishes in couple of seconds:
...
1: Totals: 385319 passed, 0 failed, 0 skipped, 0 blacklisted, 5066ms
When the same code is built with Qt 6.6.0, the test times out, while being stuck in the data generation phase.
The duplication check should implement separate bookkeeping and look-up using a QSet. Either for all scenarios, or at least for ones that involve a large number of test cases (i.e., switch from direct search in dataList to QSet once number of entries exceeds a certain threshold).