aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlan Alpert <aalpert@blackberry.com>2013-04-10 14:18:46 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-10 23:52:00 +0200
commitcbd82ea95ea70b4561c1b019e78a9bc4aaf1e5ee (patch)
treec6f6b97e0b655e854a3f304bc9efc269a3937043 /tests
parentccbf0560b36515630328be44a20f4fe62eaec531 (diff)
Stabilize Test
Use QProcess::waitForFinished over a signal spy. Has a chance of stabilizing the test, but also cleans up the code. Change-Id: I888c3b9da6d44d11516227c085bcc12a5ccb5e8a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp b/tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp
index 1c11fcbc73..4780ee0310 100644
--- a/tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp
+++ b/tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp
@@ -110,13 +110,11 @@ void tst_qqmlapplicationengine::application()
*/
QDir::setCurrent(buildDir);
QProcess *testProcess = new QProcess(this);
- QTest::ignoreMessage(QtWarningMsg, "Don't know how to handle 'QProcess::ExitStatus', use qRegisterMetaType to register it.");
- QSignalSpy processFinished(testProcess, SIGNAL(finished(int,QProcess::ExitStatus)));
QStringList args;
args << QLatin1String("testData");
testProcess->start(QLatin1String("testapp/testapp"), args);
- QTRY_VERIFY(processFinished.count());//Application should immediately exit
- QCOMPARE(processFinished[0][0].toInt(), 0);
+ QVERIFY(testProcess->waitForFinished(5000));
+ QCOMPARE(testProcess->exitCode(), 0);
QByteArray test_stdout = testProcess->readAllStandardOutput();
QByteArray test_stderr = testProcess->readAllStandardError();
QByteArray test_stderr_target("Start: testData\nEnd\n");