From e6fdab148b207b6e0cf9279b4b82578d95f021a9 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Tue, 6 Oct 2009 11:51:18 +0300 Subject: 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 --- .../auto/qsystemsemaphore/tst_qsystemsemaphore.cpp | 21 ++++++++++----------- 1 file 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 #include - //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) -- cgit v0.12