summaryrefslogtreecommitdiffstats
path: root/tests/auto/concurrent/qtconcurrentmap
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-02-16 08:54:58 +0100
committerLiang Qi <liang.qi@qt.io>2018-02-16 08:54:58 +0100
commit942ab490724fcc9544e786e5783718e1a07aa50b (patch)
treefeb7d3ff716edb37b2ca60e33c05adf8777bd964 /tests/auto/concurrent/qtconcurrentmap
parent0fb8271a467202990c90321066e40faed640a7a8 (diff)
parent24adaa9a742e6f95ff897d0eb9a2bce0527dd042 (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts: src/corelib/tools/tools.pri Change-Id: I705630f9cecbf0ce51a22fc6116b8c49611259e9
Diffstat (limited to 'tests/auto/concurrent/qtconcurrentmap')
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/BLACKLIST2
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/concurrent/qtconcurrentmap/BLACKLIST b/tests/auto/concurrent/qtconcurrentmap/BLACKLIST
deleted file mode 100644
index 7cd8961f6f..0000000000
--- a/tests/auto/concurrent/qtconcurrentmap/BLACKLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-[qFutureAssignmentLeak]
-ci opensuse
diff --git a/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
index 2ff1b9410c..b864b065e6 100644
--- a/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
+++ b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
@@ -2402,9 +2402,12 @@ void tst_QtConcurrentMap::qFutureAssignmentLeak()
future.waitForFinished();
}
- QCOMPARE(currentInstanceCount.load(), 1000);
+ // Use QTRY_COMPARE because QtConcurrent::ThreadEngine::asynchronousFinish()
+ // deletes its internals after signaling finished, so it might still be holding
+ // on to copies of InstanceCounter for a short while.
+ QTRY_COMPARE(currentInstanceCount.load(), 1000);
future = QFuture<InstanceCounter>();
- QCOMPARE(currentInstanceCount.load(), 0);
+ QTRY_COMPARE(currentInstanceCount.load(), 0);
}
inline void increment(int &num)