summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-08-07 13:04:58 +0200
committerUlf Hermann <ulf.hermann@qt.io>2017-08-07 12:45:48 +0000
commitcac4b7c87c57089c1f36ec25e58239ddb5ff0302 (patch)
tree8add190f7c31f6316757eb4f4fbea31c446a3679
parent60ccbac5ddc4d659f1e83120148ccc1e3f526759 (diff)
downloadqt-creator-cac4b7c87c57089c1f36ec25e58239ddb5ff0302.tar.gz
QmlProfiler: Make sure local runner test fails before test run ends
QTimer::singleShot postpones the execution of the test methods. If we return from the current test method before, we might end the test run before the code gets executed. This was hiding failures. Change-Id: I0250cd37e5b25f2a72752a2d6f3abcac3314946a Reviewed-by: hjk <hjk@qt.io>
-rw-r--r--src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp
index 21bddf6f33..154ee48b9a 100644
--- a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp
+++ b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp
@@ -73,6 +73,7 @@ void LocalQmlProfilerRunnerTest::testRunner()
start();
QTimer::singleShot(0, this, &LocalQmlProfilerRunnerTest::testRunner1);
+ QTRY_COMPARE_WITH_TIMEOUT(runControl, nullptr, 70000);
}
void LocalQmlProfilerRunnerTest::testRunner1()
@@ -115,6 +116,7 @@ void LocalQmlProfilerRunnerTest::testRunner4()
{
QTRY_VERIFY_WITH_TIMEOUT(!running, 10000);
delete runControl;
+ runControl = nullptr;
}
void LocalQmlProfilerRunnerTest::testFindFreePort()