From 346bdc6143dfe79a4b02a5fc410a8963b3d0c1f9 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Tue, 20 Jul 2021 14:48:19 +0200 Subject: [PATCH] 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 --- tests/benchmarks/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/benchmarks/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp b/tests/benchmarks/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp index 2973070872..6e88bad1cd 100644 --- a/tests/benchmarks/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp +++ b/tests/benchmarks/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp @@ -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));