From aad982d60fc6944813b350d7a312a1f1a0f3e1be Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 5 Nov 2015 21:57:28 +0100 Subject: Refactor press and hold tests We can't rely on timers in auto tests. They are not fired accurately under heavy CPU load => random CI failures. This change make the press and hold tests independent of timeouts. The idea in a nutshell: the test creates two control instances, and sends press events to both of them. Both controls run their timers and emit pressAndHold() - unless canceled. The test waits as long as it takes for the second control to emit pressAndHold(). At that point we can reliably assume that the first control would have already emitted the signal, if it was not canceled as appropriate. Change-Id: I96aaf4d204db368171209271a4a0fa2ff15cc323 Task-number: QTBUG-47963 Reviewed-by: Mitch Curtis --- .gitignore | 1 + 1 file changed, 1 insertion(+) (limited to '.gitignore') diff --git a/.gitignore b/.gitignore index 1101847776..5713572c34 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ /tests/auto/applicationwindow/tst_applicationwindow /tests/auto/calendar/tst_calendar /tests/auto/controls/tst_controls +/tests/auto/pressandhold/tst_pressandhold /tests/auto/sanity/tst_sanity /tests/auto/snippets/tst_snippets /tests/auto/theme/tst_theme -- cgit v1.2.3