diff --git a/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp index f43149c3eb..859cd1b36a 100644 --- a/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp +++ b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp @@ -520,7 +520,8 @@ void tst_QThreadPool::setMaxThreadCountStartsAndStopsThreads() QVERIFY(task->waitForStarted.tryAcquire(6, 1000)); task->waitToFinish.release(10); -// delete task; + threadPool.waitForDone(); + delete task; } void tst_QThreadPool::reserveThread_data()