diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-07-09 11:03:54 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-07-09 11:03:54 (GMT) |
commit | 8bc84e2180e1d5819b372f4cd8c236b853145803 (patch) | |
tree | 6c5e6a8b6a1750e2484fd34f48be662fcf51959f /tests/auto/qobjectrace | |
parent | d641198fa71fadd243e84dfdf02b9a0536a27b3f (diff) | |
parent | 3b1e30bb1d6651a626aba1f6b8883f5524598ed3 (diff) | |
download | Qt-8bc84e2180e1d5819b372f4cd8c236b853145803.zip Qt-8bc84e2180e1d5819b372f4cd8c236b853145803.tar.gz Qt-8bc84e2180e1d5819b372f4cd8c236b853145803.tar.bz2 |
Merge commit 'origin/master' into 4.6-merged
Conflicts:
src/corelib/kernel/qcoreevent.cpp
src/corelib/tools/qdumper.cpp
src/gui/kernel/qwidget.cpp
src/gui/kernel/qwidget_p.h
src/gui/kernel/qwidget_s60.cpp
src/gui/text/qfontdatabase.cpp
src/network/access/qnetworkreplyimpl.cpp
src/sql/drivers/ibase/qsql_ibase.cpp
src/testlib/qtestcase.cpp
src/testlib/testlib.pro
tests/auto/network-settings.h
tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp
tests/auto/qobjectrace/tst_qobjectrace.cpp
tests/auto/qsqldatabase/tst_qsqldatabase.cpp
tools/configure/configureapp.cpp
translations/qt_ru.ts
Diffstat (limited to 'tests/auto/qobjectrace')
-rw-r--r-- | tests/auto/qobjectrace/qobjectrace.pro | 2 | ||||
-rw-r--r-- | tests/auto/qobjectrace/tst_qobjectrace.cpp | 30 |
2 files changed, 29 insertions, 3 deletions
diff --git a/tests/auto/qobjectrace/qobjectrace.pro b/tests/auto/qobjectrace/qobjectrace.pro index 3339654..322adff 100644 --- a/tests/auto/qobjectrace/qobjectrace.pro +++ b/tests/auto/qobjectrace/qobjectrace.pro @@ -1,3 +1,5 @@ load(qttest_p4) SOURCES += tst_qobjectrace.cpp QT = core + +TARGET.EPOCHEAPSIZE = 20000000 40000000 diff --git a/tests/auto/qobjectrace/tst_qobjectrace.cpp b/tests/auto/qobjectrace/tst_qobjectrace.cpp index 98c7a30..b3052e0 100644 --- a/tests/auto/qobjectrace/tst_qobjectrace.cpp +++ b/tests/auto/qobjectrace/tst_qobjectrace.cpp @@ -44,7 +44,10 @@ #include <QtTest/QtTest> -enum { OneMinute = 60 * 1000, TwoMinutes = OneMinute * 2 }; +enum { OneMinute = 60 * 1000, + TwoMinutes = OneMinute * 2, + TenMinutes = OneMinute * 10, + TwentyFiveMinutes = OneMinute * 25 }; class tst_QObjectRace: public QObject { @@ -136,6 +139,11 @@ private slots: void tst_QObjectRace::moveToThreadRace() { +#if defined(Q_OS_SYMBIAN) + // ### FIXME: task 257411 - remove xfail once this is fixed + QEXPECT_FAIL("", "Symbian event dispatcher can't handle this kind of race, see task: 257411", Abort); + QVERIFY(false); +#endif RaceObject *object = new RaceObject; enum { ThreadCount = 10 }; @@ -210,8 +218,24 @@ public: } }; +#if defined(Q_OS_SYMBIAN) +// Symbian needs "a bit" more time +# define EXTRA_THREAD_WAIT TenMinutes +# define MAIN_THREAD_WAIT TwentyFiveMinutes +#else +# define EXTRA_THREAD_WAIT 3000 +# define MAIN_THREAD_WAIT TwoMinutes +#endif + void tst_QObjectRace::destroyRace() { +#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86) + // ### FIXME: task 257411 - remove xfail once this is fixed. + // Oddly enough, this seems to work properly in HW, if given enough time and memory. + QEXPECT_FAIL("", "Symbian event dispatcher can't handle this kind of race on emulator, see task: 257411", Abort); + QVERIFY(false); +#endif + enum { ThreadCount = 10, ObjectCountPerThread = 733, ObjectCount = ThreadCount * ObjectCountPerThread }; @@ -244,10 +268,10 @@ void tst_QObjectRace::destroyRace() for (int i = 0; i < ThreadCount; ++i) threads[i]->start(); - QVERIFY(threads[0]->wait(TwoMinutes)); + QVERIFY(threads[0]->wait(MAIN_THREAD_WAIT)); // the other threads should finish pretty quickly now for (int i = 1; i < ThreadCount; ++i) - QVERIFY(threads[i]->wait(3000)); + QVERIFY(threads[i]->wait(EXTRA_THREAD_WAIT)); for (int i = 0; i < ThreadCount; ++i) delete threads[i]; |