summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-10-06 08:51:18 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-10-07 02:36:52 (GMT)
commitc4c4cc81e714e765c448d805dfccc56ce0370dfa (patch)
tree3347d7bf47cd836901150e9f817f597cf1d04c92
parent9a025e28a7b3d86070667c6d4fa10fe46cb0acee (diff)
downloadQt-c4c4cc81e714e765c448d805dfccc56ce0370dfa.zip
Qt-c4c4cc81e714e765c448d805dfccc56ce0370dfa.tar.gz
Qt-c4c4cc81e714e765c448d805dfccc56ce0370dfa.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 (cherry picked from commit e6fdab148b207b6e0cf9279b4b82578d95f021a9)
-rw-r--r--tests/auto/qsystemsemaphore/tst_qsystemsemaphore.cpp21
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)