From bb07cc280cf23fe2a05ee3b43c61e7aec7f03af4 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 9 Jan 2018 17:57:25 +0100 Subject: [PATCH] QmlProfiler: Reduce retry params for testConnectionFailure() This greatly reduces the test execution time, hopefully avoiding the test function timeouts. As we know that all the connections fail, a 1ms interval should be enough and retrying twice should be enough to exercise the retry path. Change-Id: I24e61aa1957313dc16b7e46f7a7de7ae483e82dc Reviewed-by: Christian Stenger --- src/plugins/qmlprofiler/tests/qmlprofilerclientmanager_test.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/qmlprofiler/tests/qmlprofilerclientmanager_test.cpp b/src/plugins/qmlprofiler/tests/qmlprofilerclientmanager_test.cpp index cd9b821ff7b..e565619de1a 100644 --- a/src/plugins/qmlprofiler/tests/qmlprofilerclientmanager_test.cpp +++ b/src/plugins/qmlprofiler/tests/qmlprofilerclientmanager_test.cpp @@ -115,6 +115,7 @@ void softAssertMessageHandler(QtMsgType type, const QMessageLogContext &context, void QmlProfilerClientManagerTest::testConnectionFailure() { + clientManager.setRetryParams(1, 2); // This triggers a lot of soft asserts. We test that it still doesn't crash and stays in a // consistent state. QByteArray fatalAsserts = qgetenv("QTC_FATAL_ASSERTS"); @@ -152,6 +153,7 @@ void QmlProfilerClientManagerTest::testConnectionFailure() clientManager.disconnectFromServer(); qputenv("QTC_FATAL_ASSERTS", fatalAsserts); + clientManager.setRetryParams(10, 10); } void QmlProfilerClientManagerTest::testUnresponsiveTcp()