Improved stability of tst_qstatemachine, mark as parallel-safe

tst_QStateMachine::postEventFromOtherThread() assumed that 10,000
iterations of the event loop in a separate thread could always be
completed successfully within the default QTRY_COMPARE timeout.
This may be false if the CPU load is already high - such as when running
other tests concurrently.

Decrease the iteration count.

Change-Id: I780523f73c0c16fa0b2ab3201b2b0affdebc198d
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
This commit is contained in:
Rohan McGovern 2012-05-31 12:47:32 +10:00 committed by Qt by Nokia
parent af8fa2794b
commit c09b5f5ad8
2 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qstatemachine
QT = core-private testlib gui widgets
SOURCES = tst_qstatemachine.cpp

View File

@ -3753,7 +3753,7 @@ private Q_SLOTS:
void postEvent()
{
m_machine->postEvent(new QEvent(QEvent::User));
if (++m_count < 10000)
if (++m_count < 1000)
QTimer::singleShot(0, this, SLOT(postEvent()));
else
quit();