Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-81979

Allow configuring a global QTestLib timeout



    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • None
    • Testing: qtestlib
    • None


      Currently 5000 ms is hard-coded in various places in qtestlib. In addition to that, qtestlib will actually double that value in order to check if a longer timeout value would be required and inform the user of it. So, each time QTRY_VERIFY/QTRY_COMPARE times out, it takes a full 10 seconds to do so.

      That might be fine for whatever cases it was originally written for, but in the majority of my tests, it's just wasting my time. In most cases I do actually need to wait for it to finish because I don't know which check it failed for if I kill the test manually.

      I would like to be able to configure the default value once (e.g. a Qt configure argument) and special-case the longer waits manually with QTRY_VERIFY_WITH_TIMEOUT, so that my code isn't full of QTRY_VERIFY_WITH_TIMEOUT calls, as QTRY_VERIFY_WITH_TIMEOUT is a very long name. Note that an application argument would be kinda annoying, as it would have to be set every time someone sets their project up in Creator. Another possibility would be a static setter in e.g. QTest.


        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.



              macadder Jason McDonald
              mitch_curtis Mitch Curtis
              0 Vote for this issue
              3 Start watching this issue



                Gerrit Reviews

                  There are no open Gerrit changes