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

QTest::qWait doesn't wait the specified time

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.9.0
    • Fix Version/s: 5.9.2
    • Component/s: Testing: qtestlib
    • Labels:
      None
    • Commits:
      35096261282bfb2d66373d290dfa35b993158bb8

      Description

      Consider the following test snippet:

          QElapsedTimer timer;
          timer.start();
          QTest::qWait(100);
          QCOMPARE(timer.elapsed(), 100);
      

      When executing this test one gets:

      FAIL!  : [snip] Compared values are not the same
         Actual   (timer.elapsed()): 99
         Expected (100)            : 100
      

      This broke some auto tests we used in KDE and which used to pass when compiling against Qt 5.7. See for example: https://build.kde.org/view/Plasma/job/Plasma%20kdecoration%20kf5-qt5%20SUSEQt5.9/4/

        Attachments

        For Gerrit Dashboard: QTBUG-61741
        # Subject Project Status CR V

          Activity

            People

            • Assignee:
              thiago Thiago Macieira
              Reporter:
              mgraesslin Martin Gräßlin
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes