summaryrefslogtreecommitdiffstats
path: root/tests/auto/concurrent
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-08-02 22:49:38 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-08-02 22:52:32 +0200
commitee07b912a1768ea0b103544f9eeac41f3cf50cf6 (patch)
tree15bfa7e4a9c098511c1fc89e2b2c240520b85e2d /tests/auto/concurrent
parent4bfff6a98b59b32605d881a463ad3edc221a7dc8 (diff)
parenta96656a8fb6a3c1fc7765659efff28f807fd0deb (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/widgets/qdockarealayout.cpp src/widgets/widgets/qmainwindow.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmainwindowlayout_p.h tests/auto/corelib/tools/qlocale/tst_qlocale.cpp tests/auto/other/macnativeevents/BLACKLIST tests/auto/widgets/widgets/qmenu/BLACKLIST Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
Diffstat (limited to 'tests/auto/concurrent')
-rw-r--r--tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp b/tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
index 4bb3fa5b28..2e698e6615 100644
--- a/tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
+++ b/tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
@@ -81,7 +81,6 @@ private slots:
void stresstest();
void noIterations();
void throttling();
- void blockSize();
void multipleResults();
};
@@ -240,50 +239,6 @@ void tst_QtConcurrentIterateKernel::throttling()
QCOMPARE(threads.count(), 1);
}
-class BlockSizeRecorder : public IterateKernel<TestIterator, void>
-{
-public:
- BlockSizeRecorder(TestIterator begin, TestIterator end)
- : IterateKernel<TestIterator, void>(begin, end)
- , peakBlockSize(0)
- , peakBegin(0)
- {}
-
- inline bool runIterations(TestIterator, int begin, int end, void *)
- {
- const int blockSize = end - begin;
- if (blockSize > peakBlockSize) {
- peakBlockSize = blockSize;
- peakBegin = begin;
- }
- return false;
- }
- int peakBlockSize;
- int peakBegin;
-};
-
-static QByteArray msgBlockSize(const BlockSizeRecorder &recorder, int expectedMinimumBlockSize)
-{
- return QByteArrayLiteral("peakBlockSize=") + QByteArray::number(recorder.peakBlockSize)
- + QByteArrayLiteral(" is less than expectedMinimumBlockSize=")
- + QByteArray::number(expectedMinimumBlockSize)
- + QByteArrayLiteral(", reached at: ") + QByteArray::number(recorder.peakBegin)
- + QByteArrayLiteral(" (ideal thread count: ") + QByteArray::number(QThread::idealThreadCount())
- + ')';
-}
-
-void tst_QtConcurrentIterateKernel::blockSize()
-{
- const int expectedMinimumBlockSize = 1024 / QThread::idealThreadCount();
- BlockSizeRecorder recorder(0, 10000);
- recorder.startBlocking();
-#ifdef Q_OS_WIN
- if (recorder.peakBlockSize < expectedMinimumBlockSize)
- QEXPECT_FAIL("", msgBlockSize(recorder, expectedMinimumBlockSize).constData(), Abort);
-#endif // Q_OS_WIN
- QVERIFY2(recorder.peakBlockSize >= expectedMinimumBlockSize, msgBlockSize(recorder, expectedMinimumBlockSize));
-}
-
class MultipleResultsFor : public IterateKernel<TestIterator, int>
{
public: