diff options
author | Janne Anttila <janne.anttila@digia.com> | 2009-10-06 08:51:18 (GMT) |
---|---|---|
committer | Janne Anttila <janne.anttila@digia.com> | 2009-10-06 08:51:53 (GMT) |
commit | e6fdab148b207b6e0cf9279b4b82578d95f021a9 (patch) | |
tree | 7cf648589b2c79413647fa73a3a8a4ef8288176d /tests/auto/qsystemsemaphore | |
parent | 56087f7ffa0c64c34f55cf24a24d9337592b6c23 (diff) | |
download | Qt-e6fdab148b207b6e0cf9279b4b82578d95f021a9.zip Qt-e6fdab148b207b6e0cf9279b4b82578d95f021a9.tar.gz Qt-e6fdab148b207b6e0cf9279b4b82578d95f021a9.tar.bz2 |
Unified and increased some lackey timeouts in systemsemaphore test.
In Symbian OS some timeouts needs to be higher ones, in order to
test complete correctly.
Reviewed-by: Miikka Heikkinen
Diffstat (limited to 'tests/auto/qsystemsemaphore')
-rw-r--r-- | tests/auto/qsystemsemaphore/tst_qsystemsemaphore.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/tests/auto/qsystemsemaphore/tst_qsystemsemaphore.cpp b/tests/auto/qsystemsemaphore/tst_qsystemsemaphore.cpp index 6bfab15..44986fa 100644 --- a/tests/auto/qsystemsemaphore/tst_qsystemsemaphore.cpp +++ b/tests/auto/qsystemsemaphore/tst_qsystemsemaphore.cpp @@ -42,13 +42,12 @@ #include <QtTest/QtTest> #include <qsystemsemaphore.h> - //TESTED_CLASS= //TESTED_FILES= #define EXISTING_SHARE "existing" - #define LACKYLOC "../qsharedmemory/lackey" +#define LACKYWAITTIME 10000 class tst_QSystemSemaphore : public QObject { @@ -199,12 +198,12 @@ void tst_QSystemSemaphore::basicProcesses() release.setProcessChannelMode(QProcess::ForwardedChannels); acquire.start(LACKYLOC "/lackey", acquireArguments); - acquire.waitForFinished(5000); + acquire.waitForFinished(LACKYWAITTIME); QVERIFY(acquire.state() == QProcess::Running); acquire.kill(); release.start(LACKYLOC "/lackey", releaseArguments); - acquire.waitForFinished(5000); - release.waitForFinished(5000); + acquire.waitForFinished(LACKYWAITTIME); + release.waitForFinished(LACKYWAITTIME); QVERIFY(acquire.state() == QProcess::NotRunning); } @@ -259,13 +258,13 @@ void tst_QSystemSemaphore::undo() QProcess acquire; acquire.setProcessChannelMode(QProcess::ForwardedChannels); acquire.start(LACKYLOC "/lackey", acquireArguments); - acquire.waitForFinished(1000); + acquire.waitForFinished(LACKYWAITTIME); QVERIFY(acquire.state()== QProcess::NotRunning); // At process exit the kernel should auto undo acquire.start(LACKYLOC "/lackey", acquireArguments); - acquire.waitForFinished(1000); + acquire.waitForFinished(LACKYWAITTIME); QVERIFY(acquire.state()== QProcess::NotRunning); } @@ -285,17 +284,17 @@ void tst_QSystemSemaphore::initialValue() release.setProcessChannelMode(QProcess::ForwardedChannels); acquire.start(LACKYLOC "/lackey", acquireArguments); - acquire.waitForFinished(10000); + acquire.waitForFinished(LACKYWAITTIME); QVERIFY(acquire.state()== QProcess::NotRunning); acquire.start(LACKYLOC "/lackey", acquireArguments << "2"); - acquire.waitForFinished(1000); + acquire.waitForFinished(LACKYWAITTIME); QVERIFY(acquire.state()== QProcess::Running); acquire.kill(); release.start(LACKYLOC "/lackey", releaseArguments); - acquire.waitForFinished(10000); - release.waitForFinished(10000); + acquire.waitForFinished(LACKYWAITTIME); + release.waitForFinished(LACKYWAITTIME); QVERIFY(acquire.state()== QProcess::NotRunning); } QTEST_MAIN(tst_QSystemSemaphore) |