From cac4b7c87c57089c1f36ec25e58239ddb5ff0302 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 7 Aug 2017 13:04:58 +0200 Subject: 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 --- src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp | 2 ++ 1 file changed, 2 insertions(+) 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() -- cgit v1.2.1