diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2012-05-25 13:59:23 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-28 05:27:35 +0200 |
commit | e767401ae736a32f3a119276d1fe04aba2e15a43 (patch) | |
tree | 29bb2070e0a68f239db329de30c80868f49a0560 /tests | |
parent | 9fa2325ab718b1d804cd1af4b282cab6deba6b56 (diff) | |
download | qtscript-e767401ae736a32f3a119276d1fe04aba2e15a43.tar.gz |
Fix race condition in tst_qsharedmemory autotest
Task-number: QTBUG-25655
Change-Id: I9d0c1498decfe94a84b3ddaba566eac92066e14d
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp b/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp index 18807a0..44f21e8 100644 --- a/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp +++ b/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp @@ -710,7 +710,8 @@ void tst_QSharedMemory::simpleThreadedProducerConsumer() p.wait(5000); while (!consumers.isEmpty()) { - QVERIFY(consumers.first()->wait(5000)); + Consumer *c = consumers.first(); + QVERIFY(c->isFinished() || c->wait(5000)); delete consumers.takeFirst(); } } |