diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2018-03-27 10:04:26 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2018-03-27 13:52:44 +0000 |
commit | fe4aaf9cc11467aa5cab0d9d1d2706b283719b0a (patch) | |
tree | bbf418406e4a5e5e8615bb070d717bef28191e1c /tests/auto | |
parent | 2ffd1a4f6baee12724de390606f6ea4ffd319def (diff) |
QML Tooling: Wait for QML trace to be started in QML profiler test
If we don't wait for anything else, we need to wait for at least the
"trace started" message before we disable profiling. Otherwise we might
disable the profiling before the first engine registers, which will give
us no trace at all.
Change-Id: I9fb64e82bd05c60640ffbbd2ece5e99edfa97f4a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp index cd8e4216f3..87c123b85d 100644 --- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp +++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp @@ -525,6 +525,8 @@ void tst_QQmlProfilerService::connect() if (!traceEnabled) m_client->client->setRecording(true); + + QTRY_VERIFY(m_client->numLoadedEventTypes() > 0); m_client->client->setRecording(false); checkTraceReceived(); checkJsHeap(); @@ -643,6 +645,7 @@ void tst_QQmlProfilerService::controlFromJS() { QCOMPARE(connect(true, "controlFromJS.qml", false), ConnectSuccess); + QTRY_VERIFY(m_client->numLoadedEventTypes() > 0); m_client->client->setRecording(false); checkTraceReceived(); checkJsHeap(); |