forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user