Halve the data-set size of tst_QSqlRecord::benchmarkRecord()

At 1000, the set-up was taking longer than the five minutes
QtTestLib's WatchDog allows, so the test got killed.

Pick-to: 6.2 6.1 5.15
Task-number: QTBUG-91713
Change-Id: Ia3c85b223fc917ad5817364505cbffe50d67ddc6
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This commit is contained in:
Edward Welbourne 2021-07-20 14:48:19 +02:00
parent 328f22561d
commit 346bdc6143

View File

@ -180,7 +180,8 @@ void tst_QSqlRecord::benchmarkRecord()
QSqlQuery qry(db);
QVERIFY_SQL(qry, exec("create table " + tableName + " (id int NOT NULL, t_varchar varchar(20), "
"t_char char(20), primary key(id))"));
for (int i = 0; i < 1000; i++)
// Limit to 500: at 600, the set-up takes nearly 5 minutes
for (int i = 0; i < 500; i++)
QVERIFY_SQL(qry, exec(QString("INSERT INTO " + tableName +
" VALUES (%1, 'VarChar%1', 'Char%1')").arg(i)));
QVERIFY_SQL(qry, exec(QString("SELECT * from ") + tableName));